summaryrefslogtreecommitdiffstats
path: root/infra/data-impl/src
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-02-02 11:10:36 +0100
committerMarek Gradzki <mgradzki@cisco.com>2018-02-02 11:10:39 +0100
commit5de9531adfb87c812a9dfb9b90f5fb53c80d5682 (patch)
tree71065fccbd8ea98b23a1b3bf88c42ac1a9a08102 /infra/data-impl/src
parente613fbfd655fc97a79be7b1d814e7e3a0632f7d5 (diff)
Use YangParserTestUtils instead of CrossSourceStatementReactor.BuildAction
Simplifies code and removes usages of deprecated YangStatementSourceImpl. Change-Id: I012e2de7a5a902927eaec87370f1850d54fbf4ee Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/data-impl/src')
-rw-r--r--infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/ModificationBaseTest.java10
1 files changed, 3 insertions, 7 deletions
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) {