use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deleteWithGenericTypeResponseThrowsNoWebApplicationExceptionTest.
/*
* @testName: deleteWithGenericTypeResponseThrowsNoWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:546;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.delete( Class ) 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 deleteWithGenericTypeResponseThrowsNoWebApplicationExceptionTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("deletenotok");
GenericType<Response> generic = createGeneric(Response.class);
Response response = sync.delete(generic);
assertStatusAndLog(response, Status.NOT_ACCEPTABLE);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method methodWithGenericTypeResponseThrowsNoWebApplicationExceptionTest.
/*
* @testName: methodWithGenericTypeResponseThrowsNoWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:564;
*
* @test_Strategy:
* jakarta.ws.rs.client.SyncInvoker.method(GenericType<Response>) 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 methodWithGenericTypeResponseThrowsNoWebApplicationExceptionTest() throws Fault {
GenericType<Response> generic = createGeneric(Response.class);
Response response = null;
for (final String method : METHODS) {
SyncInvoker sync = createSyncInvokerForMethod(method.toLowerCase() + "notok");
response = sync.method(method, generic);
assertStatusAndLog(response, Status.NOT_ACCEPTABLE);
}
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method postWithStringClassThrowsWebApplicationExceptionTest.
/*
* @testName: postWithStringClassThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:585;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.post( Entity, Class ) 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 postWithStringClassThrowsWebApplicationExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerForMethod("postnotok");
Entity<String> entity = createEntity("post");
sync.post(entity, String.class);
}
};
assertWebApplicationException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deleteWithGenericTypeStringThrowsWebApplicationExceptionTest.
/*
* @testName: deleteWithGenericTypeStringThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:546;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.delete( Class ) 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 deleteWithGenericTypeStringThrowsWebApplicationExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerForMethod("deletenotok");
GenericType<String> generic = createGeneric(String.class);
sync.delete(generic);
}
};
assertWebApplicationException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method postWithGenericTypeStringThrowsWebApplicationExceptionTest.
/*
* @testName: postWithGenericTypeStringThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:588;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.post( Entity, GenericType )
* 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 postWithGenericTypeStringThrowsWebApplicationExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerForMethod("postnotok");
Entity<String> entity = createEntity("post");
GenericType<String> generic = createGeneric(String.class);
sync.post(entity, generic);
}
};
assertWebApplicationException(run);
}
Aggregations