use of ee.jakarta.tck.ws.rs.ee.rs.ext.interceptor.writer.writerinterceptorcontext.ProceedException in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method proceedThrowsWebApplicationExceptionTest.
/*
* @testName: proceedThrowsWebApplicationExceptionTest
*
* @assertion_ids: JAXRS:JAVADOC:936; JAXRS:JAVADOC:1009; JAXRS:JAVADOC:930;
*
* @test_Strategy: Proceed to the next interceptor in the chain.
* Throws:WebApplicationException - thrown by the wrapped {@code
* MessageBodyWriter.writeTo} method.
*
* proceed is actually called in every clientwriter.writerinterceptorcontext
* test
*
* WriterInterceptor.aroundWriteTo
*/
@Test
public void proceedThrowsWebApplicationExceptionTest() throws Fault {
addProvider(StringBeanEntityProvider.class);
addHeader(TemplateInterceptorBody.OPERATION, ContextOperation.PROCEEDTHROWSWEBAPPEXCEPTION.name());
setRequestContentEntity(new OnWriteExceptionThrowingStringBean(TemplateInterceptorBody.ENTITY));
try {
invoke();
} catch (Exception e) {
ProceedException p = assertCause(e, ProceedException.class, "Proceed did not throw exception");
assertContains(p.getMessage(), TemplateInterceptorBody.WAE, "Unexpected message received", p.getMessage());
logMsg(p.getMessage());
}
}
Aggregations