diff options
Diffstat (limited to 'infra/data-impl')
-rw-r--r-- | infra/data-impl/pom.xml | 5 | ||||
-rw-r--r-- | infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/infra/data-impl/pom.xml b/infra/data-impl/pom.xml index 55e646a5c..3e5b4b92d 100644 --- a/infra/data-impl/pom.xml +++ b/infra/data-impl/pom.xml @@ -74,6 +74,11 @@ <artifactId>skinny-logback</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>org.opendaylight.yangtools</groupId> + <artifactId>yang-test-util</artifactId> + <scope>test</scope> + </dependency> </dependencies> <build> diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java index c7d78faf6..7e9c34dfa 100644 --- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java +++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java @@ -21,6 +21,7 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import java.util.Arrays; +import java.util.Collections; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -46,9 +47,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuil import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; -import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor; -import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangInferencePipeline; -import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangStatementSourceImpl; +import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; abstract class ModificationBaseTest extends ModificationMetadata { @@ -127,10 +126,7 @@ abstract class ModificationBaseTest extends ModificationMetadata { } SchemaContext getSchemaCtx() throws ReactorException { - final CrossSourceStatementReactor.BuildAction buildAction = YangInferencePipeline.RFC6020_REACTOR.newBuild(); - buildAction.addSource( - new YangStatementSourceImpl(ModificationDiffTest.class.getResourceAsStream("/test-diff.yang"))); - return buildAction.buildEffective(); + return YangParserTestUtils.parseYangSources(Collections.singletonList("/test-diff.yang")); } DataTreeModification getModification(final TipProducingDataTree dataTree) { |