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%2Fcnsn%2Fto%2Fjson%2Ftest%2FCnSnToJsonWithAugmentTest.java;h=ab977fe3cae111731ddc4663d0503f9b6a120e3d;hp=eb6a5b9e00f7c7af65d2398bd2e21e87f650fe9f;hb=1e884647502a8d91f8a57bde8193c60b9bbcce0d;hpb=73c9fecf86aad02761df47fe0cc943af4ea1f2bc diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonWithAugmentTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonWithAugmentTest.java index eb6a5b9e00..ab977fe3ca 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonWithAugmentTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonWithAugmentTest.java @@ -7,19 +7,8 @@ */ package org.opendaylight.controller.sal.restconf.impl.cnsn.to.json.test; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.opendaylight.controller.sal.restconf.impl.test.TestUtils.containsStringData; - -import java.io.IOException; -import javax.ws.rs.WebApplicationException; import org.junit.BeforeClass; -import org.junit.Test; -import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider; -import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider; -import org.opendaylight.controller.sal.restconf.impl.test.TestUtils; import org.opendaylight.controller.sal.restconf.impl.test.YangAndXmlAndDataSchemaLoader; -import org.opendaylight.yangtools.yang.data.api.CompositeNode; public class CnSnToJsonWithAugmentTest extends YangAndXmlAndDataSchemaLoader { @@ -28,29 +17,4 @@ public class CnSnToJsonWithAugmentTest extends YangAndXmlAndDataSchemaLoader { dataLoad("/cnsn-to-json/augmentation", 5, "yang", "cont"); } - /** - * Test of json output when as input are specified composite node with empty data + YANG file - */ - @Test - public void augmentedElementsToJson() { - CompositeNode compositeNode = TestUtils.readInputToCnSn("/cnsn-to-json/augmentation/xml/data.xml", - XmlToCompositeNodeProvider.INSTANCE); - TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName); - - String jsonOutput = null; - try { - jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode, - StructuredDataToJsonProvider.INSTANCE); - } catch (WebApplicationException | IOException e) { - } - assertNotNull(jsonOutput); - - assertTrue(containsStringData(jsonOutput, "\"augment-leaf:lf2\"", ":", "\"lf2\"")); - assertTrue(containsStringData(jsonOutput, "\"augment-container:cont1\"", ":", "\\{")); - assertTrue(containsStringData(jsonOutput, "\"augment-container:lf11\"", ":", "\"lf11\"")); - assertTrue(containsStringData(jsonOutput, "\"augment-list:lst1\"", ":", "\\[")); - assertTrue(containsStringData(jsonOutput, "\"augment-list:lf11\"", ":", "\"lf1_1\"")); - assertTrue(containsStringData(jsonOutput, "\"augment-list:lf11\"", ":", "\"lf1_2\"")); - assertTrue(containsStringData(jsonOutput, "\"augment-leaflist:lflst1\"", ":", "\\[")); - } -} +} \ No newline at end of file