use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method traceWithGenericTypeStringTest.
/*
* @testName: traceWithGenericTypeStringTest
*
* @assertion_ids: JAXRS:JAVADOC:604;
*
* @test_Strategy: Invoke HTTP trace method for the current request
* synchronously.
*/
@Test
public void traceWithGenericTypeStringTest() throws Fault {
GenericType<String> generic = createGeneric(String.class);
SyncInvoker sync = createSyncInvokerForMethod("trace");
String response = sync.trace(generic);
assertResponseString(response, "trace");
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method optionsWithStringClassTest.
/*
* @testName: optionsWithStringClassTest
*
* @assertion_ids: JAXRS:JAVADOC:577;
*
* @test_Strategy: Invoke HTTP options method for the current request
* synchronously.
*/
@Test
public void optionsWithStringClassTest() throws Fault {
SyncInvoker sync = createSyncInvokerForMethod("options");
String response = sync.options(String.class);
assertResponseString(response, "options");
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method postWithGenericTypeStringThrowsProcessingExceptionTest.
/*
* @testName: postWithGenericTypeStringThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:588;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.post( Entity, GenericType )
* throws ProcessingException in case the invocation failed.
*/
@Test
public void postWithGenericTypeStringThrowsProcessingExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerWrongUrl();
Entity<String> entity = createEntity("post");
GenericType<String> generic = createGeneric(String.class);
sync.post(entity, generic);
}
};
assertProcessingException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method getWithStringClassThrowsWebApplicationExceptionTest.
/*
* @testName: getWithStringClassThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:551;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.get( 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 getWithStringClassThrowsWebApplicationExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerForMethod("getnotok");
sync.get(String.class);
}
};
assertWebApplicationException(run);
}
use of jakarta.ws.rs.client.SyncInvoker in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method putThrowsProcessingExceptionTest.
/*
* @testName: putThrowsProcessingExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:591;
*
* @test_Strategy: jakarta.ws.rs.client.SyncInvoker.put(Entity) throws
* ProcessingException in case the invocation failed.
*/
@Test
public void putThrowsProcessingExceptionTest() throws Fault {
Runnable run = new Runnable() {
@Override
public void run() {
SyncInvoker sync = createSyncInvokerWrongUrl();
Entity<String> entity = createEntity("put");
sync.put(entity);
}
};
assertProcessingException(run);
}
Aggregations