X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Frestconf-nb%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fnb%2Frfc8040%2Fjersey%2Fproviders%2Ferrors%2FRestconfDocumentedExceptionMapperTest.java;h=097d6307166518e0ddde06cf4b3d9a9c044510c3;hb=4e2e5beb0ab9fa93b74ea1ce97969cf15257630f;hp=bda623865de6e6c61b7b218e13823fd0ce8a4c55;hpb=df7615b3f88eb60d9ef960b32fa916d19a2833d9;p=netconf.git diff --git a/restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/errors/RestconfDocumentedExceptionMapperTest.java b/restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/errors/RestconfDocumentedExceptionMapperTest.java index bda623865d..097d630716 100644 --- a/restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/errors/RestconfDocumentedExceptionMapperTest.java +++ b/restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/errors/RestconfDocumentedExceptionMapperTest.java @@ -30,21 +30,20 @@ import org.junit.runners.Parameterized.Parameters; import org.opendaylight.restconf.common.errors.RestconfDocumentedException; import org.opendaylight.restconf.common.errors.RestconfError; import org.opendaylight.restconf.nb.jaxrs.JaxRsMediaTypes; +import org.opendaylight.restconf.nb.rfc8040.ErrorTagMapping; import org.opendaylight.restconf.server.api.DatabindContext; import org.opendaylight.yangtools.yang.common.ErrorTag; import org.opendaylight.yangtools.yang.common.ErrorType; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.QNameModule; -import org.opendaylight.yangtools.yang.common.Revision; -import org.opendaylight.yangtools.yang.common.XMLNamespace; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; import org.skyscreamer.jsonassert.JSONAssert; @RunWith(Parameterized.class) public class RestconfDocumentedExceptionMapperTest { - private static final QNameModule MONITORING_MODULE_INFO = QNameModule.create( - XMLNamespace.of("instance:identifier:patch:module"), Revision.of("2015-11-21")); + private static final QNameModule MONITORING_MODULE_INFO = + QNameModule.ofRevision("instance:identifier:patch:module", "2015-11-21"); private static RestconfDocumentedExceptionMapper exceptionMapper; @@ -53,7 +52,8 @@ public class RestconfDocumentedExceptionMapperTest { final var schemaContext = YangParserTestUtils.parseYangResources( RestconfDocumentedExceptionMapperTest.class, "/restconf/impl/ietf-restconf@2017-01-26.yang", "/instanceidentifier/yang/instance-identifier-patch-module.yang"); - exceptionMapper = new RestconfDocumentedExceptionMapper(() -> DatabindContext.ofModel(schemaContext)); + exceptionMapper = new RestconfDocumentedExceptionMapper(() -> DatabindContext.ofModel(schemaContext), + ErrorTagMapping.RFC8040); } /** @@ -216,7 +216,7 @@ public class RestconfDocumentedExceptionMapperTest { } @Test - public void testFormatingJson() throws JSONException { + public void testFormattingJson() throws JSONException { assumeTrue(expectedResponse.getMediaType().equals(JaxRsMediaTypes.APPLICATION_YANG_DATA_JSON)); exceptionMapper.setHttpHeaders(httpHeaders); @@ -246,4 +246,4 @@ public class RestconfDocumentedExceptionMapperTest { JSONAssert.assertEquals(expectedResponseInJson, actualResponseInJson, true); } } -} \ No newline at end of file +}