X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Frestconf-nb-rfc8040%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fnb%2Frfc8040%2Fjersey%2Fproviders%2Ftest%2FJsonBodyReaderTest.java;fp=restconf%2Frestconf-nb-bierman02%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fjersey%2Fproviders%2FJsonBodyReaderTest.java;h=fc29d70c3a887e13f9a3bcc5ec5c3518f096bf0a;hb=afabc939fc258e64453e4210e7d1193148636d81;hp=0a437cb80da7fc4b28211b056abc21c13f23a003;hpb=137964264e29415705e90552757ab65de493694a;p=netconf.git diff --git a/restconf/restconf-nb-bierman02/src/test/java/org/opendaylight/restconf/jersey/providers/JsonBodyReaderTest.java b/restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/test/JsonBodyReaderTest.java similarity index 96% rename from restconf/restconf-nb-bierman02/src/test/java/org/opendaylight/restconf/jersey/providers/JsonBodyReaderTest.java rename to restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/test/JsonBodyReaderTest.java index 0a437cb80d..fc29d70c3a 100644 --- a/restconf/restconf-nb-bierman02/src/test/java/org/opendaylight/restconf/jersey/providers/JsonBodyReaderTest.java +++ b/restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/test/JsonBodyReaderTest.java @@ -6,7 +6,7 @@ * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.restconf.jersey.providers; +package org.opendaylight.restconf.nb.rfc8040.jersey.providers.test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -24,9 +24,9 @@ import javax.ws.rs.core.MediaType; import org.junit.BeforeClass; import org.junit.Test; import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService; -import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils; -import org.opendaylight.controller.sal.rest.impl.test.providers.TestXmlBodyReader; import org.opendaylight.restconf.common.context.NormalizedNodeContext; +import org.opendaylight.restconf.nb.rfc8040.TestRestconfUtils; +import org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonNormalizedNodeBodyReader; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil; @@ -72,7 +72,6 @@ public class JsonBodyReaderTest extends AbstractBodyReaderTest { final Collection testFiles = TestRestconfUtils.loadFiles("/instanceidentifier/yang"); testFiles.addAll(TestRestconfUtils.loadFiles("/modules")); schemaContext = YangParserTestUtils.parseYangSources(testFiles); - CONTROLLER_CONTEXT.setSchemas(schemaContext); when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mock(DOMMountPointService.class)); } @@ -136,7 +135,8 @@ public class JsonBodyReaderTest extends AbstractBodyReaderTest { .node(contAugmentQName); final String uri = "instance-identifier-module:cont"; mockBodyReader(uri, this.jsonBodyReader, true); - final InputStream inputStream = TestXmlBodyReader.class + final InputStream inputStream = + XmlBodyReaderTest.class .getResourceAsStream("/instanceidentifier/json/json_augment_container.json"); final NormalizedNodeContext returnValue = this.jsonBodyReader.readFrom(null, null, null, this.mediaType, null, inputStream); @@ -160,7 +160,7 @@ public class JsonBodyReaderTest extends AbstractBodyReaderTest { .node(augmentChoice1QName).node(augChoice2II).node(augmentChoice2QName).node(containerQName); final String uri = "instance-identifier-module:cont"; mockBodyReader(uri, this.jsonBodyReader, true); - final InputStream inputStream = TestXmlBodyReader.class + final InputStream inputStream = XmlBodyReaderTest.class .getResourceAsStream("/instanceidentifier/json/json_augment_choice_container.json"); final NormalizedNodeContext returnValue = this.jsonBodyReader.readFrom(null, null, null, this.mediaType, null, inputStream);