use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method optionsWithGenericTypeThrowsProcessingExceptionTest.
/*
* @testName: optionsWithGenericTypeThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:395;
*
* @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 optionsWithGenericTypeThrowsProcessingExceptionTest() throws Fault {
_hostname = NONEXISTING_SITE;
AsyncInvoker async = startAsyncInvokerForMethod("options");
GenericType<String> generic = createGeneric(String.class);
Future<String> future = async.options(generic);
assertExceptionWithProcessingExceptionIsThrownAndLog(future);
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method getWithGenericTypeResponseWhileServerWaitTest.
/*
* @testName: getWithGenericTypeResponseWhileServerWaitTest
*
* @assertion_ids: JAXRS:JAVADOC:381;
*
* @test_Strategy: Invoke HTTP GET method for the current request
* asynchronously.
*/
@Test
public void getWithGenericTypeResponseWhileServerWaitTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("getandwait");
GenericType<Response> generic = createGeneric(Response.class);
Future<Response> future = async.get(generic);
checkFutureOkResponse(future);
// return future;
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method optionsWithGenericTypeThrowsNoWebApplicationExceptionForResponseTest.
/*
* @testName:
* optionsWithGenericTypeThrowsNoWebApplicationExceptionForResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:395;
*
* @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 optionsWithGenericTypeThrowsNoWebApplicationExceptionForResponseTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("optionsnotok");
GenericType<Response> generic = createGeneric(Response.class);
Future<Response> future = async.options(generic);
checkFutureStatusResponseNoTime(future, Status.NOT_ACCEPTABLE);
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putWithResponseClassWhileServerWaitTest.
/*
* @testName: putWithResponseClassWhileServerWaitTest
*
* @assertion_ids: JAXRS:JAVADOC:402;
*
* @test_Strategy: Invoke HTTP put method for the current request
* asynchronously.
*/
@Test
public void putWithResponseClassWhileServerWaitTest() throws Fault {
Entity<String> entity = Entity.entity("put", MediaType.WILDCARD_TYPE);
AsyncInvoker async = startAsyncInvokerForMethod("putandwait");
Future<Response> future = async.put(entity, Response.class);
checkFutureOkResponse(future);
// return future;
}
use of jakarta.ws.rs.client.AsyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceTest.
// ------------------------------------------------------------------
// ---------------------------TRACE -----------------------------------
// ------------------------------------------------------------------
/*
* @testName: traceTest
*
* @assertion_ids: JAXRS:JAVADOC:405;
*
* @test_Strategy: Invoke HTTP trace method for the current request
* asynchronously.
*/
@Test
public void traceTest() throws Fault {
AsyncInvoker async = startAsyncInvokerForMethod("trace");
Future<Response> future = async.trace();
checkFutureOkResponseNoTime(future);
// return future;
}
Aggregations