YANGTOOLS-706: Refactor YangInferencePipeline
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / EffectiveIdentityTest.java
index 057fec2ce3e5aac0f04bbe560ca7ae10272e4b26..4386222cc33e68ac686fe24f82e312e8ffa63715 100644 (file)
@@ -21,12 +21,12 @@ import org.junit.Test;
 import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.parser.impl.DefaultReactors;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 import org.opendaylight.yangtools.yang.parser.spi.meta.SomeModifiersUnresolvedException;
 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 import org.opendaylight.yangtools.yang.parser.spi.source.StatementStreamSource;
 import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangInferencePipeline;
 
 public class EffectiveIdentityTest {
 
@@ -37,12 +37,10 @@ public class EffectiveIdentityTest {
             "/stmt-test/identity/cyclic-identity-test.yang");
 
     @Test(expected = SomeModifiersUnresolvedException.class)
-    public void cyclicefineTest() throws SourceException, ReactorException,
-            URISyntaxException {
+    public void cyclicefineTest() throws SourceException, ReactorException, URISyntaxException {
 
-        CrossSourceStatementReactor.BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR
-                .newBuild();
-        reactor.addSources(CYCLIC_IDENTITY_TEST);
+        CrossSourceStatementReactor.BuildAction reactor = DefaultReactors.defaultReactor().newBuild()
+                .addSources(CYCLIC_IDENTITY_TEST);
         try {
             reactor.buildEffective();
         } catch (SomeModifiersUnresolvedException e) {
@@ -54,10 +52,9 @@ public class EffectiveIdentityTest {
     @Test
     public void identityTest() throws SourceException, ReactorException,
             URISyntaxException {
-
-        CrossSourceStatementReactor.BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR.newBuild();
-        reactor.addSources(IDENTITY_TEST);
-        SchemaContext result = reactor.buildEffective();
+        SchemaContext result = DefaultReactors.defaultReactor().newBuild()
+                .addSources(IDENTITY_TEST)
+                .buildEffective();
 
         assertNotNull(result);