X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FCnSnToXmlAndJsonInstanceIdentifierTest.java;h=3f2c212bd87785ccbf021749d9bddb1db069bf6f;hp=0492b3efd4f1b7a1696c1452a5d69ee9fec07c12;hb=05861a85bc830af3fce638c301949da23c803ee4;hpb=4b3b7ad70a58d1b741cac2cb8ff00d614a8bc8cd diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CnSnToXmlAndJsonInstanceIdentifierTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CnSnToXmlAndJsonInstanceIdentifierTest.java index 0492b3efd4..3f2c212bd8 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CnSnToXmlAndJsonInstanceIdentifierTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CnSnToXmlAndJsonInstanceIdentifierTest.java @@ -64,7 +64,7 @@ public class CnSnToXmlAndJsonInstanceIdentifierTest extends YangAndXmlAndDataSch @Ignore @Test public void saveCnSnWithLeafListInstIdentifierToXmlTest() throws WebApplicationException, IOException, - URISyntaxException, XMLStreamException { + URISyntaxException, XMLStreamException { CompositeNode cnSn = prepareCnSn(createInstanceIdentifierWithLeafList()); String output = TestUtils.writeCompNodeWithSchemaContextToOutput(cnSn, modules, dataSchemaNode, StructuredDataToXmlProvider.INSTANCE); @@ -94,7 +94,7 @@ public class CnSnToXmlAndJsonInstanceIdentifierTest extends YangAndXmlAndDataSch @Test public void saveCnSnWithLeafListInstIdentifierToJsonTest() throws WebApplicationException, IOException, - URISyntaxException { + URISyntaxException { CompositeNode cnSn = prepareCnSn(createInstanceIdentifierWithLeafList()); String output = TestUtils.writeCompNodeWithSchemaContextToOutput(cnSn, modules, dataSchemaNode, StructuredDataToJsonProvider.INSTANCE); @@ -111,7 +111,7 @@ public class CnSnToXmlAndJsonInstanceIdentifierTest extends YangAndXmlAndDataSch assertTrue(strInOutput); } - private void validateXmlOutput(String xml) throws XMLStreamException { + private void validateXmlOutput(final String xml) throws XMLStreamException { XMLInputFactory xmlInFactory = XMLInputFactory.newInstance(); XMLEventReader eventReader; @@ -152,7 +152,7 @@ public class CnSnToXmlAndJsonInstanceIdentifierTest extends YangAndXmlAndDataSch } - private void validateXmlOutputWithLeafList(String xml) throws XMLStreamException { + private void validateXmlOutputWithLeafList(final String xml) throws XMLStreamException { XMLInputFactory xmlInFactory = XMLInputFactory.newInstance(); XMLEventReader eventReader; @@ -188,7 +188,7 @@ public class CnSnToXmlAndJsonInstanceIdentifierTest extends YangAndXmlAndDataSch } - private CompositeNode prepareCnSn(InstanceIdentifier instanceIdentifier) throws URISyntaxException { + private CompositeNode prepareCnSn(final InstanceIdentifier instanceIdentifier) throws URISyntaxException { MutableCompositeNode cont = NodeFactory.createMutableCompositeNode( TestUtils.buildQName("cont", "instance:identifier:module", "2014-01-17"), null, null,null,null); MutableCompositeNode cont1 = NodeFactory.createMutableCompositeNode( @@ -200,13 +200,13 @@ public class CnSnToXmlAndJsonInstanceIdentifierTest extends YangAndXmlAndDataSch lst11, instanceIdentifier,null,null); - lst11.getChildren().add(lf111); + lst11.getValue().add(lf111); lst11.init(); - cont1.getChildren().add(lst11); + cont1.getValue().add(lst11); cont1.init(); - cont.getChildren().add(cont1); + cont.getValue().add(cont1); cont.init(); return cont; @@ -226,7 +226,7 @@ public class CnSnToXmlAndJsonInstanceIdentifierTest extends YangAndXmlAndDataSch pathArguments.add(new NodeIdentifier(new QName(new URI("augment:augment:module"), "lf112"))); - return new InstanceIdentifier(pathArguments); + return InstanceIdentifier.create(pathArguments); } private InstanceIdentifier createInstanceIdentifierWithLeafList() throws URISyntaxException { @@ -235,7 +235,7 @@ public class CnSnToXmlAndJsonInstanceIdentifierTest extends YangAndXmlAndDataSch pathArguments.add(new NodeIdentifier(new QName(new URI("instance:identifier:module"), "cont1"))); pathArguments.add(new NodeWithValue(new QName(new URI("augment:module:leaf:list"), "lflst11"), "lflst11_1")); - return new InstanceIdentifier(pathArguments); + return InstanceIdentifier.create(pathArguments); } }