use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putWithResponseClassThrowsNoWebApplicationExceptionTest.
/*
* @testName: putWithResponseClassThrowsNoWebApplicationExceptionTest
*
* @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 putWithResponseClassThrowsNoWebApplicationExceptionTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("putnotok");
Entity<String> entity = createEntity("put");
Response response = sync.put(entity, 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 optionsWithGenericTypeStringThrowsProcessingExceptionTest.
/*
* @testName: optionsWithGenericTypeStringThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:580;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.options( GenericType )
* throws ProcessingException in case the invocation failed.
*/
@Test
public void optionsWithGenericTypeStringThrowsProcessingExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerWrongUrl();
GenericType<String> generic = createGeneric(String.class);
sync.options(generic);
}
};
assertProcessingException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putTest.
// ------------------------------------------------------------------
// ---------------------------PUT -----------------------------------
// ------------------------------------------------------------------
/*
* @testName: putTest
*
* @assertion_ids: JAXRS:JAVADOC:591;
*
* @test_Strategy: Invoke HTTP PUT method for the current request
* synchronously.
*/
@Test
public void putTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("put");
Entity<String> entity = createEntity("put");
Response response = sync.put(entity);
assertResponseOk(response);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method optionsWithResponseClassTest.
/*
* @testName: optionsWithResponseClassTest
*
* @assertion_ids: JAXRS:JAVADOC:577;
*
* @test_Strategy: Invoke HTTP options method for the current request
* synchronously.
*/
@Test
public void optionsWithResponseClassTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("options");
Response response = sync.options(Response.class);
assertResponseOk(response);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method methodWithStringClassThrowsProcessingExceptionTest.
/*
* @testName: methodWithStringClassThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:561;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.method(String) 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 methodWithStringClassThrowsProcessingExceptionTest() throws Fault {
for (final String method : METHODS) {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerWrongUrl();
sync.method(method, String.class);
}
};
assertProcessingException(run);
}
}
Aggregations