Search in sources :

Example 1 with QueryMapEncoder

use of feign.QueryMapEncoder in project feign by OpenFeign.

the class ReactiveFeignIntegrationTest method testQueryMapEncoders.

@Test
public void testQueryMapEncoders() {
    this.webServer.enqueue(new MockResponse().setBody("No Results Found"));
    QueryMapEncoder encoder = mock(QueryMapEncoder.class);
    given(encoder.encode(any(Object.class))).willReturn(Collections.emptyMap());
    TestReactiveXService service = RxJavaFeign.builder().queryMapEncoder(encoder).target(TestReactiveXService.class, this.getServerUrl());
    StepVerifier.create(service.search(new SearchQuery())).expectNext("No Results Found").expectComplete().verify();
    verify(encoder, times(1)).encode(any(Object.class));
}
Also used : MockResponse(okhttp3.mockwebserver.MockResponse) QueryMapEncoder(feign.QueryMapEncoder) Test(org.junit.Test)

Aggregations

QueryMapEncoder (feign.QueryMapEncoder)1 MockResponse (okhttp3.mockwebserver.MockResponse)1 Test (org.junit.Test)1