use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithResponseClassWhileServerWaitTest.
/*
* @testName: traceWithResponseClassWhileServerWaitTest
*
* @assertion_ids: JAXRS:JAVADOC:406;
*
* @test_Strategy: Invoke HTTP trace method for the current request
* asynchronously.
*/
@Test
public void traceWithResponseClassWhileServerWaitTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("traceandwait");
Future<Response> future = async.trace(Response.class);
checkFutureOkResponse(future);
// return future;
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithClassThrowsWebApplicationExceptionTest.
/*
* @testName: traceWithClassThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:406;
*
* @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 traceWithClassThrowsWebApplicationExceptionTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("tracenotok");
Future<String> future = async.trace(String.class);
assertExceptionWithWebApplicationExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method postWithGenericTypeThrowsWebApplicationExceptionTest.
/*
* @testName: postWithGenericTypeThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:399;
*
* @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 postWithGenericTypeThrowsWebApplicationExceptionTest() throws Fault {
Entity<String> entity = Entity.entity("post", MediaType.WILDCARD_TYPE);
GenericType<String> generic = createGeneric(String.class);
AsyncInvoker async = startAsyncInvokerForMethod("postnotok");
Future<String> future = async.post(entity, generic);
assertExceptionWithWebApplicationExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putWithClassThrowsProcessingExceptionTest.
/*
* @testName: putWithClassThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:402;
*
* @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 putWithClassThrowsProcessingExceptionTest() throws Fault {
_hostname = NONEXISTING_SITE;
Entity<String> entity = Entity.entity("put", MediaType.WILDCARD_TYPE);
AsyncInvoker async = startAsyncInvokerForMethod("put");
Future<String> future = async.put(entity, String.class);
assertExceptionWithProcessingExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deleteThrowsExceptionTest.
/*
* @testName: deleteThrowsExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:375;
*
* @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 deleteThrowsExceptionTest() throws Fault {
_hostname = NONEXISTING_SITE;
AsyncInvoker async = startAsyncInvokerForMethod("delete");
Future<Response> future = async.delete();
assertExceptionWithProcessingExceptionIsThrownAndLog(future);
}
Aggregations