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%2Fjson%2Ftest%2FCnSnJsonChoiceCaseTest.java;h=21590ecb335fa81c309012bc34b92c1975da169c;hb=48814d6a264b8f13e5db1422336d9ef25cb05fa9;hp=15122cfe3ad1101b1f9685bb763d8dce10e3fb4d;hpb=6eb461f54fe6705b07f34b6cee197ea968de4991;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnJsonChoiceCaseTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnJsonChoiceCaseTest.java index 15122cfe3a..21590ecb33 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnJsonChoiceCaseTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnJsonChoiceCaseTest.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.restconf.impl.cnsn.to.json.test; import static org.junit.Assert.assertTrue; @@ -9,6 +16,7 @@ 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; @@ -24,7 +32,7 @@ public class CnSnJsonChoiceCaseTest extends YangAndXmlAndDataSchemaLoader { * Test when some data are in one case node and other in another. This isn't * correct. Next Json validator should return error because nodes has to be * from one case below concrete choice. - * + * */ @Test public void nodeSchemasOnVariousChoiceCasePathTest() { @@ -36,7 +44,7 @@ public class CnSnJsonChoiceCaseTest extends YangAndXmlAndDataSchemaLoader { * Additionally data are loadef from various choices. This isn't correct. * Next Json validator should return error because nodes has to be from one * case below concrete choice. - * + * */ @Test public void nodeSchemasOnVariousChoiceCasePathAndMultipleChoicesTest() { @@ -87,7 +95,7 @@ public class CnSnJsonChoiceCaseTest extends YangAndXmlAndDataSchemaLoader { } /** - * + * */ @Test public void nodeSchemasInMultipleChoicesTest() { @@ -112,7 +120,7 @@ public class CnSnJsonChoiceCaseTest extends YangAndXmlAndDataSchemaLoader { } private void testWrapper(String xmlPath, String pathToSchemaNode) { - CompositeNode compNode = TestUtils.loadCompositeNode(xmlPath); + CompositeNode compNode = TestUtils.readInputToCnSn(xmlPath, XmlToCompositeNodeProvider.INSTANCE); TestUtils.normalizeCompositeNode(compNode, modules, pathToSchemaNode); try { TestUtils.writeCompNodeWithSchemaContextToOutput(compNode, modules, dataSchemaNode,