X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Fcnsn%2Fto%2Fxml%2Ftest%2FCnSnToXmlWithChoiceTest.java;h=b5fd49f6deee94e5dd00bb975bc638425e95a103;hb=e631dc96f0461b2270377dc072b9f969a875667a;hp=ac7fe20818f31fc7fbb5bfd24b4399b2113cadee;hpb=aefe82b158bc1694fe633053d04f2364bcbe67d9;p=controller.git
diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/xml/test/CnSnToXmlWithChoiceTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/xml/test/CnSnToXmlWithChoiceTest.java
index ac7fe20818..b5fd49f6de 100644
--- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/xml/test/CnSnToXmlWithChoiceTest.java
+++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/xml/test/CnSnToXmlWithChoiceTest.java
@@ -7,28 +7,13 @@
*/
package org.opendaylight.controller.sal.restconf.impl.cnsn.to.xml.test;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-
-import javax.ws.rs.WebApplicationException;
-
import org.junit.BeforeClass;
-import org.junit.Test;
-import org.opendaylight.controller.sal.rest.impl.StructuredDataToXmlProvider;
-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;
-import org.opendaylight.yangtools.yang.data.api.ModifyAction;
-import org.opendaylight.yangtools.yang.data.api.MutableCompositeNode;
-import org.opendaylight.yangtools.yang.data.api.MutableSimpleNode;
-import org.opendaylight.yangtools.yang.data.impl.NodeFactory;
/**
*
- * CnSn = Composite node and Simple node data structure Class contains test of
- * serializing simple nodes data values according data types from YANG schema to
- * XML file
+ * CnSn = Composite node and Simple node data structure Class contains test of serializing simple nodes data values
+ * according data types from YANG schema to XML file
*
*/
public class CnSnToXmlWithChoiceTest extends YangAndXmlAndDataSchemaLoader {
@@ -37,38 +22,4 @@ public class CnSnToXmlWithChoiceTest extends YangAndXmlAndDataSchemaLoader {
dataLoad("/cnsn-to-xml/choice", 1, "module-with-choice", "cont");
}
- @Test
- public void cnSnToXmlWithYangChoice() {
- String xmlOutput = "";
- try {
- xmlOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(
- prepareCnStructForYangData("lf1", "String data1"), modules, dataSchemaNode,
- StructuredDataToXmlProvider.INSTANCE);
- } catch (WebApplicationException | IOException e) {
- }
-
- assertTrue(xmlOutput.contains("String data1"));
-
- try {
- xmlOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(
- prepareCnStructForYangData("lf2", "String data2"), modules, dataSchemaNode,
- StructuredDataToXmlProvider.INSTANCE);
- } catch (WebApplicationException | IOException e) {
- }
- assertTrue(xmlOutput.contains("String data2"));
-
- }
-
- private CompositeNode prepareCnStructForYangData(final String lfName, final Object data) {
- MutableCompositeNode cont = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont"), null, null,
- ModifyAction.CREATE, null);
-
- MutableSimpleNode