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%2FXmlAndJsonToCnSnLeafRefTest.java;h=1c8e53e69ff5091d9a9013947d09cb6381d5723a;hp=483d90da0d220fc1054929d01008afabb5871175;hb=8cf40f4741c70a760dadb4300946c1dc88f95611;hpb=484151212f586dd533984a11063c92799c414ec8 diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/XmlAndJsonToCnSnLeafRefTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/XmlAndJsonToCnSnLeafRefTest.java index 483d90da0d..1c8e53e69f 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/XmlAndJsonToCnSnLeafRefTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/XmlAndJsonToCnSnLeafRefTest.java @@ -8,6 +8,7 @@ package org.opendaylight.controller.sal.restconf.impl.test; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.io.IOException; import java.net.URISyntaxException; @@ -29,15 +30,22 @@ public class XmlAndJsonToCnSnLeafRefTest extends YangAndXmlAndDataSchemaLoader { @Test public void loadXmlToCnSn() throws WebApplicationException, IOException, URISyntaxException { - CompositeNode cnSn = TestUtils.readInputToCnSn("/leafref/xml/xmldata.xml", XmlToCompositeNodeProvider.INSTANCE); + Node node = TestUtils.readInputToCnSn("/leafref/xml/xmldata.xml", XmlToCompositeNodeProvider.INSTANCE); + + assertTrue(node instanceof CompositeNode); + CompositeNode cnSn = (CompositeNode)node; + TestUtils.normalizeCompositeNode(cnSn, modules, schemaNodePath); verifyContPredicate(cnSn, "/ns:cont/ns:lf1", "/cont/lf1", "/ns:cont/ns:lf1", "../lf1"); } @Test public void loadJsonToCnSn() throws WebApplicationException, IOException, URISyntaxException { - CompositeNode cnSn = TestUtils.readInputToCnSn("/leafref/json/jsondata.json", + Node node = TestUtils.readInputToCnSn("/leafref/json/jsondata.json", JsonToCompositeNodeProvider.INSTANCE); + assertTrue(node instanceof CompositeNode); + CompositeNode cnSn = (CompositeNode)node; + TestUtils.normalizeCompositeNode(cnSn, modules, schemaNodePath); verifyContPredicate(cnSn, "/leafref-module:cont/leafref-module:lf1", "/leafref-module:cont/leafref-module:lf1", "/referenced-module:cont/referenced-module:lf1", "/leafref-module:cont/leafref-module:lf1");