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 {
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);