use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method methodWithEntityTest.
/*
* @testName: methodWithEntityTest
*
* @assertion_ids: JAXRS:JAVADOC:1144; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1174;
*
* @test_Strategy: Invoke an arbitrary method for the current request
*/
@Test
public void methodWithEntityTest() throws Fault {
Future<Response> future = null;
for (String method : ENTITY_METHODS) {
CompletionStageRxInvoker rx = startRxInvokerForMethod(method.toLowerCase() + "");
Entity<String> entity = Entity.entity(method, MediaType.WILDCARD_TYPE);
future = rx.method(method, entity).toCompletableFuture();
checkFutureOkResponse(future);
}
}
use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithClassThrowsNoWebApplicationExceptionForResponseTest.
/*
* @testName: traceWithClassThrowsNoWebApplicationExceptionForResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:1157; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1187;
*
* @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 traceWithClassThrowsNoWebApplicationExceptionForResponseTest() throws Fault {
CompletionStageRxInvoker rx = startRxInvokerForMethod("tracenotok");
Future<Response> future = rx.trace(Response.class).toCompletableFuture();
checkFutureResponseStatus(future, Status.NOT_ACCEPTABLE);
}
use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putWithClassThrowsWebApplicationExceptionTest.
/*
* @testName: putWithClassThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:1154; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1184;
*
* @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 putWithClassThrowsWebApplicationExceptionTest() throws Fault {
Entity<String> entity = Entity.entity("put", MediaType.WILDCARD_TYPE);
CompletionStageRxInvoker rx = startRxInvokerForMethod("putnotok");
Future<String> future = rx.put(entity, String.class).toCompletableFuture();
assertExceptionWithWebApplicationExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method optionsWithClassThrowsNoWebApplicationExceptionForResponseTest.
/*
* @testName: optionsWithClassThrowsNoWebApplicationExceptionForResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:1148; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1178;
*
* @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 optionsWithClassThrowsNoWebApplicationExceptionForResponseTest() throws Fault {
CompletionStageRxInvoker rx = startRxInvokerForMethod("optionsnotok");
Future<Response> future = rx.options(Response.class).toCompletableFuture();
checkFutureResponseStatus(future, Status.NOT_ACCEPTABLE);
}
use of jakarta.ws.rs.client.CompletionStageRxInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method methodWithGenericTypeResponseTest.
/*
* @testName: methodWithGenericTypeResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:1143; JAXRS:JAVADOC:1162; JAXRS:JAVADOC:1173;
*
* @test_Strategy: Invoke an arbitrary method for the current request
*/
@Test
public void methodWithGenericTypeResponseTest() throws Fault {
GenericType<Response> generic = createGeneric(Response.class);
Future<Response> future = null;
for (String method : METHODS) {
CompletionStageRxInvoker rx = startRxInvokerForMethod(method.toLowerCase() + "");
future = rx.method(method, generic).toCompletableFuture();
checkFutureOkResponse(future);
}
}
Aggregations