- private static SchemaContext resolveSchemaContext(List<InputStream> streams) {
- final CrossSourceStatementReactor.BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR.newBuild();
- final SchemaContext schemaContext;
-
- try {
- schemaContext = reactor.buildEffective(streams);
- } catch (ReactorException e) {
- throw new RuntimeException("Unable to build schema context from " + streams, e);
- }
- return schemaContext;
- }
-
- /**
- * Returns a test document.
- * <p/>
- * <p/>
- * <pre>
- * test
- * outer-list
- * id 1
- * outer-list
- * id 2
- * inner-list
- * name "one"
- * inner-list
- * name "two"
- *
- * </pre>
- */
- public static NormalizedNode<?, ?> createDocumentOne(
- SchemaContext schemaContext) {
- return ImmutableContainerNodeBuilder
- .create()
- .withNodeIdentifier(
- new NodeIdentifier(schemaContext.getQName()))
- .withChild(createTestContainer()).build();
-
+ public static EffectiveModelContext createTestContextWithoutAugmentationSchema() {
+ return YangParserTestUtils.parseYangResources(TestModel.class, DATASTORE_TEST_YANG,
+ DATASTORE_TEST_NOTIFICATION_YANG);