Migrate getDataChildByName() users
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / repo / SharedSchemaRepositoryWithFeaturesTest.java
index df0c09686bcccb123e82b606d4ef305f4a2f5cf1..41473ea2130ad913e6ce2132e4761060e99350a7 100644 (file)
@@ -25,8 +25,8 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.repo.api.EffectiveModelContextFactory;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaContextFactoryConfiguration;
 import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
-import org.opendaylight.yangtools.yang.parser.rfc7950.repo.ASTSchemaSource;
-import org.opendaylight.yangtools.yang.parser.rfc7950.repo.TextToASTTransformer;
+import org.opendaylight.yangtools.yang.parser.rfc7950.ir.IRSchemaSource;
+import org.opendaylight.yangtools.yang.parser.rfc7950.repo.TextToIRTransformer;
 
 public class SharedSchemaRepositoryWithFeaturesTest {
 
@@ -37,7 +37,7 @@ public class SharedSchemaRepositoryWithFeaturesTest {
         final SharedSchemaRepository sharedSchemaRepository = new SharedSchemaRepository(
                 "shared-schema-repo-with-features-test");
 
-        final SettableSchemaProvider<ASTSchemaSource> foobar = getImmediateYangSourceProviderFromResource(
+        final SettableSchemaProvider<IRSchemaSource> foobar = getImmediateYangSourceProviderFromResource(
             "/if-feature-resolution-test/shared-schema-repository/foobar.yang");
         foobar.register(sharedSchemaRepository);
         foobar.setResult();
@@ -60,7 +60,7 @@ public class SharedSchemaRepositoryWithFeaturesTest {
                 QName.create(module.getQNameModule(), "test-leaf-a"));
         assertNotNull(testLeafA);
 
-        final ContainerSchemaNode testContainerB = (ContainerSchemaNode) module.getDataChildByName(
+        final ContainerSchemaNode testContainerB = (ContainerSchemaNode) module.dataChildByName(
                 QName.create(module.getQNameModule(), "test-container-b"));
         assertNull(testContainerB);
 
@@ -77,7 +77,7 @@ public class SharedSchemaRepositoryWithFeaturesTest {
         final SharedSchemaRepository sharedSchemaRepository = new SharedSchemaRepository(
                 "shared-schema-repo-with-features-test");
 
-        final SettableSchemaProvider<ASTSchemaSource> foobar = getImmediateYangSourceProviderFromResource(
+        final SettableSchemaProvider<IRSchemaSource> foobar = getImmediateYangSourceProviderFromResource(
             "/if-feature-resolution-test/shared-schema-repository/foobar.yang");
         foobar.register(sharedSchemaRepository);
         foobar.setResult();
@@ -119,7 +119,7 @@ public class SharedSchemaRepositoryWithFeaturesTest {
         final SharedSchemaRepository sharedSchemaRepository = new SharedSchemaRepository(
                 "shared-schema-repo-with-features-test");
 
-        final SettableSchemaProvider<ASTSchemaSource> foobar = getImmediateYangSourceProviderFromResource(
+        final SettableSchemaProvider<IRSchemaSource> foobar = getImmediateYangSourceProviderFromResource(
             "/if-feature-resolution-test/shared-schema-repository/foobar.yang");
         foobar.register(sharedSchemaRepository);
         foobar.setResult();
@@ -143,11 +143,11 @@ public class SharedSchemaRepositoryWithFeaturesTest {
         assertNotNull(testLeafC);
     }
 
-    private static SettableSchemaProvider<ASTSchemaSource> getImmediateYangSourceProviderFromResource(
+    private static SettableSchemaProvider<IRSchemaSource> getImmediateYangSourceProviderFromResource(
             final String resourceName) throws Exception {
         final YangTextSchemaSource yangSource = YangTextSchemaSource.forResource(resourceName);
-        return SettableSchemaProvider.createImmediate(TextToASTTransformer.transformText(yangSource),
-            ASTSchemaSource.class);
+        return SettableSchemaProvider.createImmediate(TextToIRTransformer.transformText(yangSource),
+            IRSchemaSource.class);
     }
 
     private static void assertSchemaContext(final SchemaContext schemaContext, final int moduleSize) {