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%2Ftest%2FNormalizeNodeTest.java;h=a2aff72d1fa8a01d7e77c544e85dffbe7154880d;hb=783679071e01620bfc468cb9f9472f2a1030ae00;hp=158569af7386eb35081ba046af00d96b0de08d96;hpb=ab9cf2e3435ef127ffcba672c5601ff75417b216;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/NormalizeNodeTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/NormalizeNodeTest.java index 158569af73..a2aff72d1f 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/NormalizeNodeTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/NormalizeNodeTest.java @@ -7,17 +7,7 @@ */ package org.opendaylight.controller.sal.restconf.impl.test; -import static org.junit.Assert.assertNotNull; - -import java.net.URI; -import java.net.URISyntaxException; - import org.junit.BeforeClass; -import org.junit.Test; -import org.opendaylight.controller.sal.restconf.impl.CompositeNodeWrapper; -import org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException; -import org.opendaylight.controller.sal.restconf.impl.SimpleNodeWrapper; -import org.opendaylight.yangtools.yang.data.api.CompositeNode; public class NormalizeNodeTest extends YangAndXmlAndDataSchemaLoader { @@ -26,45 +16,4 @@ public class NormalizeNodeTest extends YangAndXmlAndDataSchemaLoader { dataLoad("/normalize-node/yang/"); } - @Test(expected=RestconfDocumentedException.class) - public void namespaceNotNullAndInvalidNamespaceAndNoModuleNameTest() { - - TestUtils.normalizeCompositeNode(prepareCnSn("wrongnamespace"), modules, schemaNodePath); - } - - @Test - public void namespaceNullTest() { - - TestUtils.normalizeCompositeNode(prepareCnSn(null), modules, schemaNodePath); - } - - @Test - public void namespaceValidNamespaceTest() { - - TestUtils.normalizeCompositeNode(prepareCnSn("normalize:node:module"), modules, schemaNodePath); - } - - @Test - public void namespaceValidModuleNameTest() { - - TestUtils.normalizeCompositeNode(prepareCnSn("normalize-node-module"), modules, schemaNodePath); - } - - private CompositeNode prepareCnSn(final String namespace) { - URI uri = null; - if (namespace != null) { - try { - uri = new URI(namespace); - } catch (URISyntaxException e) { - } - assertNotNull(uri); - } - - SimpleNodeWrapper lf1 = new SimpleNodeWrapper(uri, "lf1", 43); - CompositeNodeWrapper cont = new CompositeNodeWrapper(uri, "cont"); - cont.addValue(lf1); - - return cont; - } - }