import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.opendaylight.yang.extension.yang.ext.rev130709.$YangModuleInfoImpl;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.model.api.source.SourceIdentifier;
import org.opendaylight.yangtools.yang.model.api.stmt.RpcEffectiveStatement;
-import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
+import org.opendaylight.yangtools.yang.model.spi.source.DelegatedYangTextSource;
+import org.opendaylight.yangtools.yang.model.spi.source.URLYangTextSource;
import org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration;
import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
@BeforeClass
public static void beforeClass() {
final var ctx = YangParserTestUtils.parseYangSources(YangParserConfiguration.DEFAULT, null,
- YangTextSchemaSource.delegateForCharSource("yang-ext.yang",
+ new DelegatedYangTextSource(new SourceIdentifier("yang-ext.yang"),
$YangModuleInfoImpl.getInstance().getYangTextCharSource()),
- YangTextSchemaSource.forResource(ContentRoutedRpcContext.class, "/rpc-routing-strategy.yang"));
+ new URLYangTextSource(ContentRoutedRpcContext.class.getResource("/rpc-routing-strategy.yang")));
RPCS = ctx.findModuleStatements("foo").iterator().next()
.streamEffectiveSubstatements(RpcEffectiveStatement.class)
assertEquals(QName.create("foo", "identity"), context.identity());
assertEquals(QName.create("foo", "ctx"), context.leaf());
}
-}
\ No newline at end of file
+}