use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putWithStringClassThrowsWebApplicationExceptionTest.
/*
* @testName: putWithStringClassThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:593;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.put( 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 putWithStringClassThrowsWebApplicationExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerForMethod("putnotok");
Entity<String> entity = createEntity("put");
sync.put(entity, String.class);
}
};
assertWebApplicationException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithResponseClassThrowsNoWebApplicationExceptionTest.
/*
* @testName: traceWithResponseClassThrowsNoWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:601;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.trace( 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 traceWithResponseClassThrowsNoWebApplicationExceptionTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("tracenotok");
Response response = sync.trace(Response.class);
assertStatusAndLog(response, Status.NOT_ACCEPTABLE);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method optionsWithStringThrowsProcessingExceptionTest.
/*
* @testName: optionsWithStringThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:577;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.options( Class ) throws
* ProcessingException in case the invocation failed.
*/
@Test
public void optionsWithStringThrowsProcessingExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerWrongUrl();
sync.options(String.class);
}
};
assertProcessingException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method optionsWithGenericTypeResponseThrowsNoWebApplicationExceptionTest.
/*
* @testName:
* optionsWithGenericTypeResponseThrowsNoWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:580;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.options( 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 optionsWithGenericTypeResponseThrowsNoWebApplicationExceptionTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("optionsnotok");
GenericType<Response> generic = createGeneric(Response.class);
Response response = sync.options(generic);
assertStatusAndLog(response, Status.NOT_ACCEPTABLE);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method getWithGenericTypeResponseThrowsNoWebApplicationExceptionTest.
/*
* @testName: getWithGenericTypeResponseThrowsNoWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:554;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.get( 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 getWithGenericTypeResponseThrowsNoWebApplicationExceptionTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("getnotok");
GenericType<Response> generic = createGeneric(Response.class);
Response response = sync.get(generic);
assertStatusAndLog(response, Status.NOT_ACCEPTABLE);
}
Aggregations