use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method methodWithGenericTypeThrowsProcessingExceptionTest.
/*
* @testName: methodWithGenericTypeThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:1143; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1173;
*
* @test_Strategy: ResponseProcessingException - in case processing of a
* received HTTP response fails (e.g. in a filter or during conversion of the
* response entity data to an instance of a particular Java type).
*/
@Test
public void methodWithGenericTypeThrowsProcessingExceptionTest() throws Fault {
_hostname = NONEXISTING_SITE;
Future<Response> future = null;
GenericType<Response> generic = createGeneric(Response.class);
for (String method : METHODS) {
CompletionStageRxInvoker rx = startRxInvokerForMethod(method.toLowerCase());
future = rx.method(method, generic).toCompletableFuture();
assertExceptionWithProcessingExceptionIsThrownAndLog(future);
}
}
use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithClassThrowsProcessingExceptionTest.
/*
* @testName: traceWithClassThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:1157; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1187;
*
* @test_Strategy: ResponseProcessingException - in case processing of a
* received HTTP response fails (e.g. in a filter or during conversion of the
* response entity data to an instance of a particular Java type).
*/
@Test
public void traceWithClassThrowsProcessingExceptionTest() throws Fault {
_hostname = NONEXISTING_SITE;
CompletionStageRxInvoker rx = startRxInvokerForMethod("trace");
Future<String> future = rx.trace(String.class).toCompletableFuture();
assertExceptionWithProcessingExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method postWithClassThrowsWebApplicationExceptionTest.
/*
* @testName: postWithClassThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:1151; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1181;
*
* @test_Strategy: WebApplicationException - in case the response status code
* of the response returned by the server is not successful and the specified
* response type is not Response.
*/
@Test
public void postWithClassThrowsWebApplicationExceptionTest() throws Fault {
Entity<String> entity = Entity.entity("post", MediaType.WILDCARD_TYPE);
CompletionStageRxInvoker rx = startRxInvokerForMethod("postnotok");
Future<String> future = rx.post(entity, String.class).toCompletableFuture();
assertExceptionWithWebApplicationExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method getWithClassThrowsProcessingExceptionTest.
/*
* @testName: getWithClassThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:1138; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1168;
*
* @test_Strategy: ResponseProcessingException - in case processing of a
* received HTTP response fails (e.g. in a filter or during conversion of the
* response entity data to an instance of a particular Java type).
*/
@Test
public void getWithClassThrowsProcessingExceptionTest() throws Fault {
_hostname = NONEXISTING_SITE;
CompletionStageRxInvoker rx = startRxInvokerForMethod("get");
Future<String> future = rx.get(String.class).toCompletableFuture();
assertExceptionWithProcessingExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method getWithGenericTypeThrowsProcessingExceptionTest.
/*
* @testName: getWithGenericTypeThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:1139; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1169;
*
* @test_Strategy: ResponseProcessingException - in case processing of a
* received HTTP response fails (e.g. in a filter or during conversion of the
* response entity data to an instance of a particular Java type).
*/
@Test
public void getWithGenericTypeThrowsProcessingExceptionTest() throws Fault {
_hostname = NONEXISTING_SITE;
CompletionStageRxInvoker rx = startRxInvokerForMethod("get");
GenericType<String> generic = createGeneric(String.class);
Future<String> future = rx.get(generic).toCompletableFuture();
assertExceptionWithProcessingExceptionIsThrownAndLog(future);
}
Aggregations