use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class FluxReactorTest method testFluxErrorWithExceptionMapperReturnsContentPayload.
@Test
public void testFluxErrorWithExceptionMapperReturnsContentPayload() throws Exception {
GenericType<List<HelloWorldBean>> helloWorldBeanListType = new GenericType<List<HelloWorldBean>>() {
};
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(helloWorldBeanListType).size() == 4).expectComplete().verify();
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class MonoReactorTest method testMonoEmpty.
@Test
public void testMonoEmpty() throws Exception {
String address = "http://localhost:" + PORT + "/reactor/mono/empty";
StepVerifier.create(ClientBuilder.newClient().register(new JacksonJsonProvider()).register(new ReactorInvokerProvider()).target(address).request(MediaType.APPLICATION_JSON).rx(ReactorInvoker.class).get(HelloWorldBean.class)).expectComplete().verify();
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class MonoReactorTest method testGetError.
@Test
public void testGetError() throws Exception {
String address = "http://localhost:" + PORT + "/reactor/mono/error";
StepVerifier.create(ClientBuilder.newClient().register(new JacksonJsonProvider()).register(new ReactorInvokerProvider()).target(address).request(MediaType.APPLICATION_JSON).rx(ReactorInvoker.class).get(HelloWorldBean.class)).expectErrorMatches(ex -> ex.getCause() instanceof InternalServerErrorException).verify();
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class MonoReactorTest method testTextJsonImplicitListAsyncStream.
@Test
public void testTextJsonImplicitListAsyncStream() throws Exception {
String address = "http://localhost:" + PORT + "/reactor/mono/textJsonImplicitListAsyncStream";
StepVerifier.create(ClientBuilder.newClient().register(new JacksonJsonProvider()).register(new ReactorInvokerProvider()).target(address).request(MediaType.APPLICATION_JSON).rx(ReactorInvoker.class).get(HelloWorldBean.class)).expectNextMatches(r -> "Hello".equals(r.getGreeting()) && "World".equals(r.getAudience())).expectComplete().verify();
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider in project cxf by apache.
the class JAXRSClientServerTikaTest method createWebClient.
private WebClient createWebClient(final String url) {
WebClient wc = WebClient.create("http://localhost:" + PORT + url, Arrays.asList(new MultipartProvider(), new JacksonJsonProvider()));
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
return wc;
}
Aggregations