YANGTOOLS-706: Refactor YangInferencePipeline
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / yin / YinFileStmtTest.java
index 3b27675a0658fbd26f3cdabb7d7d17850bd55d84..426ce69396ee9e0e02bbf51dd63e3464a86137de 100644 (file)
@@ -18,6 +18,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.repo.api.YinTextSchemaSource;
+import org.opendaylight.yangtools.yang.parser.impl.DefaultReactors;
 import org.opendaylight.yangtools.yang.parser.rfc6020.repo.YinStatementStreamSource;
 import org.opendaylight.yangtools.yang.parser.rfc6020.repo.YinTextToDomTransformer;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
@@ -25,7 +26,6 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.SomeModifiersUnresolvedEx
 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.BuildAction;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangInferencePipeline;
 import org.opendaylight.yangtools.yang.stmt.TestUtils;
 import org.xml.sax.SAXException;
 
@@ -54,8 +54,8 @@ public class YinFileStmtTest {
     }
 
     @Test
-    public void readAndParseYinFileTestModel() throws SourceException, ReactorException {
-        SchemaContext result = YangInferencePipeline.RFC6020_REACTOR.newBuild()
+    public void readAndParseYinFileTestModel() throws ReactorException {
+        SchemaContext result = DefaultReactors.defaultReactor().newBuild()
                 .addSources(YIN_FILE, EXT_FILE, EXT_USE_FILE)
                 .buildEffective();
         assertNotNull(result);
@@ -64,7 +64,7 @@ public class YinFileStmtTest {
     // parsing yin file whose import statement references a module which does not exist
     @Test(expected = SomeModifiersUnresolvedException.class)
     public void readAndParseInvalidYinFileTest() throws ReactorException {
-        SchemaContext result = YangInferencePipeline.RFC6020_REACTOR.newBuild()
+        SchemaContext result = DefaultReactors.defaultReactor().newBuild()
                 .addSource(INVALID_YIN_FILE)
                 .buildEffective();
         assertNotNull(result);
@@ -72,7 +72,7 @@ public class YinFileStmtTest {
 
     // parsing yin file with duplicate key name in a list statement
     public void readAndParseInvalidYinFileTest2() {
-        BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR.newBuild()
+        BuildAction reactor = DefaultReactors.defaultReactor().newBuild()
                 .addSource(INVALID_YIN_FILE_2);
 
         try {