X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-data-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fimpl%2Fschema%2Ftree%2FBug5830Test.java;h=9571bb6be0ed888c23d88df81aa1e2d9c1606361;hb=9041b2200d7c48962615f414ed884cb54a7573df;hp=ce45c4c4b9197f3d6237741aaa010fcb9c8d1a70;hpb=6e92a84ca5633f779319f9817d7b9a40638d7b40;p=yangtools.git diff --git a/yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/Bug5830Test.java b/yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/Bug5830Test.java index ce45c4c4b9..9571bb6be0 100644 --- a/yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/Bug5830Test.java +++ b/yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/Bug5830Test.java @@ -30,7 +30,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailed import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeBuilder; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; public class Bug5830Test { private static final String NS = "foo"; @@ -47,7 +47,7 @@ public class Bug5830Test { private static final QName PRESENCE_CONTAINER_2 = QName.create(NS, REV, "presence-container-2"); private static final QName MANDATORY_LEAF_2 = QName.create(NS, REV, "mandatory-leaf-2"); - private static DataTree initDataTree(final SchemaContext schemaContext) + private static DataTree initDataTree(final EffectiveModelContext schemaContext) throws DataValidationFailedException { DataTree inMemoryDataTree = new InMemoryDataTreeFactory().create( DataTreeConfiguration.DEFAULT_CONFIGURATION, schemaContext); @@ -71,7 +71,7 @@ public class Bug5830Test { } private static void testPresenceContainer() throws DataValidationFailedException { - final SchemaContext schemaContext = TestModel.createTestContext("/bug5830/foo-presence.yang"); + final EffectiveModelContext schemaContext = TestModel.createTestContext("/bug-5830/foo-presence.yang"); assertNotNull("Schema context must not be null.", schemaContext); testContainerIsNotPresent(schemaContext); @@ -87,7 +87,7 @@ public class Bug5830Test { } private static void testNonPresenceContainer() throws DataValidationFailedException { - final SchemaContext schemaContext = TestModel.createTestContext("/bug5830/foo-non-presence.yang"); + final EffectiveModelContext schemaContext = TestModel.createTestContext("/bug-5830/foo-non-presence.yang"); assertNotNull("Schema context must not be null.", schemaContext); try { @@ -111,7 +111,7 @@ public class Bug5830Test { } private static void testMultipleContainers() throws DataValidationFailedException { - final SchemaContext schemaContext = TestModel.createTestContext("/bug5830/foo-multiple.yang"); + final EffectiveModelContext schemaContext = TestModel.createTestContext("/bug-5830/foo-multiple.yang"); assertNotNull("Schema context must not be null.", schemaContext); testContainerIsNotPresent(schemaContext); @@ -145,7 +145,7 @@ public class Bug5830Test { } } - private static void testContainerIsNotPresent(final SchemaContext schemaContext) + private static void testContainerIsNotPresent(final EffectiveModelContext schemaContext) throws DataValidationFailedException { final DataTree inMemoryDataTree = initDataTree(schemaContext); final MapEntryNode taskEntryNode = Builders.mapEntryBuilder() @@ -164,7 +164,8 @@ public class Bug5830Test { inMemoryDataTree.commit(prepare); } - private static void testContainerIsPresent(final SchemaContext schemaContext) throws DataValidationFailedException { + private static void testContainerIsPresent(final EffectiveModelContext schemaContext) + throws DataValidationFailedException { final DataTree inMemoryDataTree = initDataTree(schemaContext); final MapEntryNode taskEntryNode = Builders.mapEntryBuilder() @@ -184,7 +185,7 @@ public class Bug5830Test { inMemoryDataTree.commit(prepare); } - private static void testMandatoryDataLeafIsPresent(final SchemaContext schemaContext) + private static void testMandatoryDataLeafIsPresent(final EffectiveModelContext schemaContext) throws DataValidationFailedException { final DataTree inMemoryDataTree = initDataTree(schemaContext); @@ -205,7 +206,7 @@ public class Bug5830Test { inMemoryDataTree.commit(prepare); } - private static void testMandatoryLeaf2IsPresent(final SchemaContext schemaContext, + private static void testMandatoryLeaf2IsPresent(final EffectiveModelContext schemaContext, final boolean withPresenceContianer) throws DataValidationFailedException { final DataTree inMemoryDataTree = initDataTree(schemaContext);