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%2FCnSnToJsonIdentityrefTest.java;h=506ca847a936c4abc006c099b02f970a6022fe36;hp=392f444cf2def8ae783c4dba0fa95b0d740746d3;hb=c46e223995956f1f759c551163c212947c1e2fb7;hpb=3c4c5f529dadea6a027cbb6430ae631da883d83d diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonIdentityrefTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonIdentityrefTest.java index 392f444cf2..506ca847a9 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonIdentityrefTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonIdentityrefTest.java @@ -13,17 +13,17 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; - import javax.ws.rs.WebApplicationException; - 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.restconf.impl.test.TestUtils; import org.opendaylight.controller.sal.restconf.impl.test.YangAndXmlAndDataSchemaLoader; import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.data.api.*; +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; public class CnSnToJsonIdentityrefTest extends YangAndXmlAndDataSchemaLoader { @@ -33,7 +33,6 @@ public class CnSnToJsonIdentityrefTest extends YangAndXmlAndDataSchemaLoader { dataLoad("/cnsn-to-json/identityref", 2, "identityref-module", "cont"); } - @Ignore @Test public void identityrefToJsonTest() { String json = null; @@ -53,7 +52,6 @@ public class CnSnToJsonIdentityrefTest extends YangAndXmlAndDataSchemaLoader { assertTrue(mtch.matches()); } - @Ignore @Test public void identityrefToJsonWithoutQNameTest() { String json = null; @@ -73,17 +71,19 @@ public class CnSnToJsonIdentityrefTest extends YangAndXmlAndDataSchemaLoader { assertTrue(mtch.matches()); } - private CompositeNode prepareCompositeNode(Object value) { - MutableCompositeNode cont = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont"), null, null, - ModifyAction.CREATE, null); - MutableCompositeNode cont1 = NodeFactory.createMutableCompositeNode(TestUtils.buildQName("cont1"), cont, null, - ModifyAction.CREATE, null); - cont.getChildren().add(cont1); + private CompositeNode prepareCompositeNode(final Object value) { + MutableCompositeNode cont = NodeFactory.createMutableCompositeNode( + TestUtils.buildQName("cont", "identityref:module", "2013-12-2"), null, null, ModifyAction.CREATE, null); + MutableCompositeNode cont1 = NodeFactory + .createMutableCompositeNode(TestUtils.buildQName("cont1", "identityref:module", "2013-12-2"), cont, + null, ModifyAction.CREATE, null); + cont.getValue().add(cont1); - MutableSimpleNode lf1 = NodeFactory.createMutableSimpleNode(TestUtils.buildQName("lf1"), cont1, value, - ModifyAction.CREATE, null); + MutableSimpleNode lf1 = NodeFactory + .createMutableSimpleNode(TestUtils.buildQName("lf1", "identityref:module", "2013-12-2"), cont1, value, + ModifyAction.CREATE, null); - cont1.getChildren().add(lf1); + cont1.getValue().add(lf1); cont1.init(); cont.init();