use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method getWithCallbackStringThrowsWebApplicationExceptionTest.
/*
* @testName: getWithCallbackStringThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:382;
*
* @test_Strategy: Note that calling the Future.get() method on the returned
* Future instance may throw an ExecutionException that wraps a
* WebApplicationException or one of its subclasses thrown in case the
* received response status code is not successful and the specified response
* type is not Response.
*/
@Test
public void getWithCallbackStringThrowsWebApplicationExceptionTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("getnotok");
InvocationCallback<String> callback = createStringCallback(false);
Future<String> future = async.get(callback);
assertExceptionWithWebApplicationExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithGenericTypeThrowsNoWebApplicationExceptionForResponseTest.
/*
* @testName:
* traceWithGenericTypeThrowsNoWebApplicationExceptionForResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:407;
*
* @test_Strategy: Note that calling the Future.get() method on the returned
* Future instance may throw an ExecutionException that wraps a
* WebApplicationException or one of its subclasses thrown in case the
* received response status code is not successful and the specified response
* type is not Response.
*/
@Test
public void traceWithGenericTypeThrowsNoWebApplicationExceptionForResponseTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("tracenotok");
GenericType<Response> generic = createGeneric(Response.class);
Future<Response> future = async.trace(generic);
checkFutureStatusResponseNoTime(future, Status.NOT_ACCEPTABLE);
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deleteWhileServerWaitTest.
/*
* @testName: deleteWhileServerWaitTest
*
* @assertion_ids: JAXRS:JAVADOC:375;
*
* @test_Strategy: Invoke HTTP DELETE method for the current request
* asynchronously.
*/
@Test
public void deleteWhileServerWaitTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("deleteandwait");
Future<Response> future = async.delete();
checkFutureOkResponse(future);
// return future;
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithGenericTypeThrowsProcessingExceptionTest.
/*
* @testName: traceWithGenericTypeThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:407;
*
* @test_Strategy: Note that calling the Future.get() method on the returned
* Future instance may throw an ExecutionException that wraps an
* jakarta.ws.rs.ProcessingException thrown in case of an invocation processing
* failure.
*/
@Test
public void traceWithGenericTypeThrowsProcessingExceptionTest() throws Fault {
_hostname = NONEXISTING_SITE;
GenericType<String> generic = createGeneric(String.class);
AsyncInvoker async = startAsyncInvokerForMethod("trace");
Future<String> future = async.trace(generic);
assertExceptionWithProcessingExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deleteWithClassThrowsNoWebApplicationExceptionForResponseTest.
/*
* @testName: deleteWithClassThrowsNoWebApplicationExceptionForResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:376;
*
* @test_Strategy: Note that calling the Future.get() method on the returned
* Future instance may throw an ExecutionException that wraps a
* WebApplicationException or one of its subclasses thrown in case the
* received response status code is not successful and the specified response
* type is not Response.
*/
@Test
public void deleteWithClassThrowsNoWebApplicationExceptionForResponseTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("deletenotok");
Future<Response> future = async.delete(Response.class);
checkFutureStatusResponseNoTime(future, Status.NOT_ACCEPTABLE);
}
Aggregations