You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2018/01/13 17:36:53 UTC

[GitHub] johnament commented on a change in pull request #366: Handle ResponseExceptionMappers

johnament commented on a change in pull request #366: Handle ResponseExceptionMappers
URL: https://github.com/apache/cxf/pull/366#discussion_r161377366
 
 

 ##########
 File path: rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/CxfTypeSafeClientBuilderTest.java
 ##########
 @@ -103,41 +108,28 @@ public void testInvokesPostOperationWithRegisteredProviders() throws Exception {
         //assertEquals(TestWriterInterceptor.getAndResetValue(), 1);
     }
 
-/** using for test coverage
-    @Override
-    public RestClientBuilder register(Class<?> componentClass, int priority) {
-      configImpl.register(componentClass, priority);
-      return this;
+    @Test(expected = NoSuchEntityException.class)
+    public void testResponseExceptionMapper() throws Exception {
+        ExceptionMappingClient client = new CxfTypeSafeClientBuilder()
+            .register(NotFoundExceptionMapper.class)
+            .register(NotFoundClientReqFilter.class)
+            .baseUrl(new URL("http://localhost/null"))
+            .build(ExceptionMappingClient.class);
+
+        Response r = client.getEntity();
+        System.out.println(r.getStatus());
 
 Review comment:
   We can probably move the SOP into the `fail` method.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services