Update KeyStep documentation
[yangtools.git] / parser / odlext-parser-support / src / test / java / org / opendaylight / yangtools / odlext / parser / MountTest.java
index 8668f49ebda623c5ab3a1dc1912eb1626e21b3e9..e6733c6fc5ac134de18c077e3975e4a19a88989f 100644 (file)
@@ -13,15 +13,14 @@ import org.junit.jupiter.api.Test;
 import org.opendaylight.yangtools.odlext.model.api.MountEffectiveStatement;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
-import org.opendaylight.yangtools.yang.common.XMLNamespace;
-import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
+import org.opendaylight.yangtools.yang.model.spi.source.URLYangTextSource;
 import org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration;
 import org.opendaylight.yangtools.yang.parser.rfc7950.reactor.RFC7950Reactors;
 import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPhase;
 
 class MountTest {
-    private static final QNameModule FOO = QNameModule.create(XMLNamespace.of("foo"));
+    private static final QNameModule FOO = QNameModule.of("foo");
 
     @Test
     void test() throws Exception {
@@ -30,10 +29,10 @@ class MountTest {
                 new MountStatementSupport(YangParserConfiguration.DEFAULT))
             .build();
         final var foo = reactor.newBuild()
-            .addSource(YangStatementStreamSource.create(YangTextSchemaSource.forResource(
-                MountTest.class, "/yang-ext.yang")))
-            .addSource(YangStatementStreamSource.create(YangTextSchemaSource.forResource(
-                MountTest.class, "/mount.yang")))
+            .addSource(YangStatementStreamSource.create(new URLYangTextSource(
+                MountTest.class.getResource("/yang-ext.yang"))))
+            .addSource(YangStatementStreamSource.create(new URLYangTextSource(
+                MountTest.class.getResource("/mount.yang"))))
             .buildEffective()
             .getModuleStatements()
             .get(FOO);