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%2FCnSnToJsonBasicDataTypesTest.java;h=1b3af6aad615254d9b1f0ccfb5785a077d5fde51;hp=1ce64d20589b30ac13e1b2647aafeb09eeca4017;hb=13d48361d8c7b09a61bf6aaa37cda699b14f881a;hpb=cf3c39048445c63710c82c0b3fb86a5694d5644f diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonBasicDataTypesTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonBasicDataTypesTest.java index 1ce64d2058..1b3af6aad6 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonBasicDataTypesTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonBasicDataTypesTest.java @@ -12,7 +12,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; - import com.google.common.collect.Maps; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; @@ -20,15 +19,7 @@ import java.io.IOException; import java.io.StringReader; import java.util.Map; import org.junit.BeforeClass; -import org.junit.Ignore; -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.RestconfDocumentedException; -import org.opendaylight.controller.sal.restconf.impl.RestconfError.ErrorTag; -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.Node; public class CnSnToJsonBasicDataTypesTest extends YangAndXmlAndDataSchemaLoader { @@ -187,23 +178,6 @@ public class CnSnToJsonBasicDataTypesTest extends YangAndXmlAndDataSchemaLoader dataLoad("/cnsn-to-json/simple-data-types"); } - @Test - @Ignore - public void simpleYangDataTest() throws Exception { - - final Node node = TestUtils.readInputToCnSn("/cnsn-to-json/simple-data-types/xml/data.xml", - XmlToCompositeNodeProvider.INSTANCE); - - TestUtils.normalizeCompositeNode(node, modules, "simple-data-types:cont"); - - final String jsonOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(node, modules, dataSchemaNode, - StructuredDataToJsonProvider.INSTANCE); - - assertNotNull(jsonOutput); - - verifyJsonOutput(jsonOutput); - } - private void verifyJsonOutput(final String jsonOutput) { final StringReader strReader = new StringReader(jsonOutput); final JsonReader jReader = new JsonReader(strReader); @@ -301,17 +275,4 @@ public class CnSnToJsonBasicDataTypesTest extends YangAndXmlAndDataSchemaLoader jReader.endObject(); } - @Test - public void testBadData() throws Exception { - - try { - final Node node = TestUtils.readInputToCnSn("/cnsn-to-json/simple-data-types/xml/bad-data.xml", - XmlToCompositeNodeProvider.INSTANCE); - - TestUtils.normalizeCompositeNode(node, modules, "simple-data-types:cont"); - fail("Expected RestconfDocumentedException"); - } catch (final RestconfDocumentedException e) { - assertEquals("getErrorTag", ErrorTag.INVALID_VALUE, e.getErrors().get(0).getErrorTag()); - } - } }