import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil;
+import org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors;
import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
import org.opendaylight.yangtools.yang.parser.spi.source.StatementStreamSource;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangInferencePipeline;
public class MoreRevisionsTest {
@Test
public void readAndParseYangFileTest() throws ReactorException {
- SchemaContext result = YangInferencePipeline.RFC6020_REACTOR.newBuild().addSource(REVFILE).buildEffective();
+ SchemaContext result = RFC7950Reactors.defaultReactor().newBuild().addSource(REVFILE).buildEffective();
assertNotNull(result);
final Module moduleByName = result.getModules().iterator().next();
assertEquals("2015-06-07", moduleByName.getQNameModule().getRevision().get().toString());
@Test
public void twoRevisionsTest() throws ReactorException {
- SchemaContext result = YangInferencePipeline.RFC6020_REACTOR.newBuild()
+ SchemaContext result = RFC7950Reactors.defaultReactor().newBuild()
.addSources(TED_20130712, TED_20131021, IETF_TYPES)
.buildEffective();
assertNotNull(result);
@Test
public void twoRevisionsTest2() throws ReactorException {
- SchemaContext result = YangInferencePipeline.RFC6020_REACTOR.newBuild()
+ SchemaContext result = RFC7950Reactors.defaultReactor().newBuild()
.addSources(NETWORK_TOPOLOGY_20130712, NETWORK_TOPOLOGY_20131021, IETF_TYPES)
.buildEffective();
assertNotNull(result);
@Test
public void moreRevisionsListKeyTest() throws ReactorException {
- SchemaContext result = YangInferencePipeline.RFC6020_REACTOR.newBuild()
+ SchemaContext result = RFC7950Reactors.defaultReactor().newBuild()
.addSources(TED_20130712, TED_20131021, ISIS_20130712, ISIS_20131021, L3_20130712, L3_20131021)
.addSources(IETF_TYPES,NETWORK_TOPOLOGY_20130712, NETWORK_TOPOLOGY_20131021)
.buildEffective();