Add utility YangTextSchemaSource factories
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / repo / SharedSchemaRepositoryWithFeaturesTest.java
index 3c4bf25ef922f2bbd139ac5c2524844df4875754..83c2d7c2872d23e0fb6118bcbb819bf1f6a87b45 100644 (file)
@@ -26,6 +26,7 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaContextFactory;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceFilter;
+import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
 import org.opendaylight.yangtools.yang.parser.util.ASTSchemaSource;
 import org.opendaylight.yangtools.yang.parser.util.TextToASTTransformer;
 
@@ -152,7 +153,7 @@ public class SharedSchemaRepositoryWithFeaturesTest {
 
     private static SettableSchemaProvider<ASTSchemaSource> getImmediateYangSourceProviderFromResource(
             final String resourceName) throws Exception {
-        final ResourceYangSource yangSource = new ResourceYangSource(resourceName);
+        final YangTextSchemaSource yangSource = YangTextSchemaSource.forResource(resourceName);
         return SettableSchemaProvider.createImmediate(TextToASTTransformer.transformText(yangSource),
             ASTSchemaSource.class);
     }