use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method methodTest.
// ------------------------------------------------------------------
// ---------------------------METHOD-----------------------------------
// ------------------------------------------------------------------
/*
* @testName: methodTest
*
* @assertion_ids: JAXRS:JAVADOC:559;
*
* @test_Strategy: Invoke an arbitrary method for the current request
* synchronously.
*/
@Test
public void methodTest() throws Fault {
Response response = null;
for (String method : METHODS) {
SyncInvoker sync = createSyncInvokerForMethod(method.toLowerCase());
response = sync.method(method);
assertResponseOk(response);
}
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithGenericTypeResponseTest.
/*
* @testName: traceWithGenericTypeResponseTest
*
* @assertion_ids: JAXRS:JAVADOC:604;
*
* @test_Strategy: Invoke HTTP trace method for the current request
* synchronously.
*/
@Test
public void traceWithGenericTypeResponseTest() throws Fault {
GenericType<Response> generic = createGeneric(Response.class);
SyncInvoker sync = createSyncInvokerForMethod("trace");
Response response = sync.trace(generic);
assertResponseOk(response);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method deleteThrowsProcessingExceptionTest.
/*
* @testName: deleteThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:541;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.delete throws
* ProcessingException in case the invocation failed.
*/
@Test
public void deleteThrowsProcessingExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerWrongUrl();
sync.delete();
}
};
assertProcessingException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method getTest.
// ------------------------------------------------------------------
// ---------------------------GET------------------------------------
// ------------------------------------------------------------------
/*
* @testName: getTest
*
* @assertion_ids: JAXRS:JAVADOC:549;
*
* @test_Strategy: Invoke HTTP GET method for the current request
* synchronously.
*/
@Test
public void getTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("get");
Response response = sync.get();
assertResponseOk(response);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method optionsWithResponseThrowsNoWebApplicationExceptionTest.
/*
* @testName: optionsWithResponseThrowsNoWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:577;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.options( 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 optionsWithResponseThrowsNoWebApplicationExceptionTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("optionsnotok");
Response response = sync.options(Response.class);
assertStatusAndLog(response, Status.NOT_ACCEPTABLE);
}
Aggregations