use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putWithGenericTypeResponseThrowsNoWebApplicationExceptionTest.
/*
* @testName: putWithGenericTypeResponseThrowsNoWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:596;
*
* @test_Strategy: throws 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 putWithGenericTypeResponseThrowsNoWebApplicationExceptionTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("putnotok");
Entity<String> entity = createEntity("put");
GenericType<Response> generic = createGeneric(Response.class);
Response response = sync.put(entity, generic);
assertStatusAndLog(response, Status.NOT_ACCEPTABLE);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putWithGenericTypeStringTest.
/*
* @testName: putWithGenericTypeStringTest
*
* @assertion_ids: JAXRS:JAVADOC:596;
*
* @test_Strategy: Invoke HTTP put method for the current request
* synchronously.
*/
@Test
public void putWithGenericTypeStringTest() throws Fault {
GenericType<String> generic = createGeneric(String.class);
Entity<String> entity = createEntity("put");
SyncInvoker sync = createSyncInvokerForMethod("put");
String response = sync.put(entity, generic);
assertResponseString(response, "put");
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceThrowsProcessingExceptionTest.
/*
* @testName: traceThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:599;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.trace(Entity) throws
* ProcessingException in case the invocation failed.
*/
@Test
public void traceThrowsProcessingExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerWrongUrl();
sync.trace();
}
};
assertProcessingException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deleteWithStringClassTest.
/*
* @testName: deleteWithStringClassTest
*
* @assertion_ids: JAXRS:JAVADOC:543;
*
* @test_Strategy: Invoke HTTP DELETE method for the current request
* synchronously.
*/
@Test
public void deleteWithStringClassTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("delete");
String response = sync.delete(String.class);
assertResponseString(response, "delete");
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deleteWithGenericTypeResponseTest.
/*
* @testName: deleteWithGenericTypeResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:546;
*
* @test_Strategy: Invoke HTTP DELETE method for the current request
* synchronously.
*/
@Test
public void deleteWithGenericTypeResponseTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("delete");
GenericType<Response> generic = createGeneric(Response.class);
Response response = sync.delete(generic);
assertResponseOk(response);
}
Aggregations