use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class FluxReactorTest method testFluxErrorsResponse.
@Test
public void testFluxErrorsResponse() throws Exception {
String address = "http://localhost:" + PORT + "/reactor2/flux/errors";
StepVerifier.create(ClientBuilder.newClient().register(new JacksonJsonProvider()).register(new ReactorInvokerProvider()).target(address).request(MediaType.APPLICATION_JSON).rx(ReactorInvoker.class).get()).expectNextMatches(r -> r.getStatus() == 500).expectComplete().verify();
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class FluxReactorTest method testFluxImmediateErrorsResponse.
@Test
public void testFluxImmediateErrorsResponse() throws Exception {
String address = "http://localhost:" + PORT + "/reactor2/flux/immediate/errors";
StepVerifier.create(ClientBuilder.newClient().register(new JacksonJsonProvider()).register(new ReactorInvokerProvider()).target(address).request(MediaType.APPLICATION_JSON).rx(ReactorInvoker.class).get()).expectNextMatches(r -> r.getStatus() == 500).expectComplete().verify();
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class FluxReactorTest method testFluxImmediateErrors.
@Test
public void testFluxImmediateErrors() throws Exception {
String address = "http://localhost:" + PORT + "/reactor2/flux/immediate/errors";
StepVerifier.create(ClientBuilder.newClient().register(new JacksonJsonProvider()).register(new ReactorInvokerProvider()).target(address).request(MediaType.APPLICATION_JSON).rx(ReactorInvoker.class).getFlux(HelloWorldBean.class)).expectError().verify();
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class FluxReactorTest method testFluxErrorWithExceptionMapperReturnsNoExceptionPayload.
@Test
public void testFluxErrorWithExceptionMapperReturnsNoExceptionPayload() throws Exception {
String address = "http://localhost:" + PORT + "/reactor2/flux/mixed/error";
StepVerifier.create(ClientBuilder.newClient().register(new JacksonJsonProvider()).register(new ReactorInvokerProvider()).target(address).request(MediaType.APPLICATION_JSON).rx(ReactorInvoker.class).get()).expectNextMatches(r -> r.getStatus() == 409 && !r.readEntity(String.class).contains("stackTrace")).expectComplete().verify();
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class FluxReactorTest method testFluxImmediateErrorsWithExceptionMapper.
@Test
public void testFluxImmediateErrorsWithExceptionMapper() throws Exception {
String address = "http://localhost:" + PORT + "/reactor2/flux/immediate/mapper/errors";
StepVerifier.create(ClientBuilder.newClient().register(new JacksonJsonProvider()).register(new ReactorInvokerProvider()).target(address).request(MediaType.APPLICATION_JSON).rx(ReactorInvoker.class).get()).expectNextMatches(r -> r.getStatus() == 409 && r.readEntity(String.class).contains("stackTrace")).expectComplete().verify();
}
Aggregations