use of org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter in project controller by opendaylight.
the class NormalizedNodePrunerTest method testNodesPrunedWhenTestSchemaMissing.
@Test
public void testNodesPrunedWhenTestSchemaMissing() throws IOException {
NormalizedNodePruner pruner = prunerNoTestSchema(TestModel.TEST_PATH);
NormalizedNodeWriter normalizedNodeWriter = NormalizedNodeWriter.forStreamWriter(pruner);
NormalizedNode<?, ?> expected = createTestContainer();
normalizedNodeWriter.write(expected);
NormalizedNode<?, ?> actual = pruner.normalizedNode();
// Since top level schema is missing null is returned
assertNull(actual);
// Asserting true here instead of checking actual value because I don't want this assertion to be fragile
assertTrue(countNodes(expected, "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test") > 0);
}
Aggregations