Merge "Fix modules Restconf call for mounted devices"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / cnsn / to / xml / test / CnSnToXmlWithChoiceTest.java
index 8e5449029c78dccaba89861feb71e018d22c6ab2..b5fd49f6deee94e5dd00bb975bc638425e95a103 100644 (file)
@@ -7,20 +7,8 @@
  */
 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;
 
 /**
  *
@@ -34,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("<lf1>String data1</lf1>"));
-
-        try {
-            xmlOutput = TestUtils.writeCompNodeWithSchemaContextToOutput(
-                    prepareCnStructForYangData("lf2", "String data2"), modules, dataSchemaNode,
-                    StructuredDataToXmlProvider.INSTANCE);
-        } catch (WebApplicationException | IOException e) {
-        }
-        assertTrue(xmlOutput.contains("<lf2>String data2</lf2>"));
-
-    }
-
-    private CompositeNode prepareCnStructForYangData(final String lfName, final Object data) {
-        MutableCompositeNode cont = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont"), null, null,
-                ModifyAction.CREATE, null);
-
-        MutableSimpleNode<Object> lf1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName(lfName), cont, data,
-                ModifyAction.CREATE, null);
-        cont.getValue().add(lf1);
-        cont.init();
-
-        return cont;
-    }
-
 }