Search in sources :

Example 1 with ResponseMappingDecoder

use of feign.Feign.ResponseMappingDecoder in project feign by OpenFeign.

the class FeignUnderAsyncTest method responseMapperIsAppliedBeforeDelegate.

@Test
public void responseMapperIsAppliedBeforeDelegate() throws IOException {
    ResponseMappingDecoder decoder = new ResponseMappingDecoder(upperCaseResponseMapper(), new StringDecoder());
    String output = (String) decoder.decode(responseWithText("response"), String.class);
    assertThat(output).isEqualTo("RESPONSE");
}
Also used : StringDecoder(feign.codec.StringDecoder) ResponseMappingDecoder(feign.Feign.ResponseMappingDecoder) Test(org.junit.Test)

Example 2 with ResponseMappingDecoder

use of feign.Feign.ResponseMappingDecoder in project feign by OpenFeign.

the class FeignTest method responseMapperIsAppliedBeforeDelegate.

@Test
public void responseMapperIsAppliedBeforeDelegate() throws IOException {
    ResponseMappingDecoder decoder = new ResponseMappingDecoder(upperCaseResponseMapper(), new StringDecoder());
    String output = (String) decoder.decode(responseWithText("response"), String.class);
    assertThat(output).isEqualTo("RESPONSE");
}
Also used : StringDecoder(feign.codec.StringDecoder) ResponseMappingDecoder(feign.Feign.ResponseMappingDecoder) Test(org.junit.Test)

Example 3 with ResponseMappingDecoder

use of feign.Feign.ResponseMappingDecoder in project feign by OpenFeign.

the class Http2ClientAsyncTest method responseMapperIsAppliedBeforeDelegate.

@Test
public void responseMapperIsAppliedBeforeDelegate() throws IOException {
    final ResponseMappingDecoder decoder = new ResponseMappingDecoder(upperCaseResponseMapper(), new StringDecoder());
    final String output = (String) decoder.decode(responseWithText("response"), String.class);
    Assertions.assertThat(output).isEqualTo("RESPONSE");
}
Also used : StringDecoder(feign.codec.StringDecoder) ResponseMappingDecoder(feign.Feign.ResponseMappingDecoder) Test(org.junit.Test)

Example 4 with ResponseMappingDecoder

use of feign.Feign.ResponseMappingDecoder in project feign by OpenFeign.

the class AsyncApacheHttp5ClientTest method responseMapperIsAppliedBeforeDelegate.

@Test
public void responseMapperIsAppliedBeforeDelegate() throws IOException {
    final ResponseMappingDecoder decoder = new ResponseMappingDecoder(upperCaseResponseMapper(), new StringDecoder());
    final String output = (String) decoder.decode(responseWithText("response"), String.class);
    assertThat(output).isEqualTo("RESPONSE");
}
Also used : ResponseMappingDecoder(feign.Feign.ResponseMappingDecoder) Test(org.junit.Test)

Example 5 with ResponseMappingDecoder

use of feign.Feign.ResponseMappingDecoder in project feign by OpenFeign.

the class AsyncFeignTest method responseMapperIsAppliedBeforeDelegate.

@Test
public void responseMapperIsAppliedBeforeDelegate() throws IOException {
    ResponseMappingDecoder decoder = new ResponseMappingDecoder(upperCaseResponseMapper(), new StringDecoder());
    String output = (String) decoder.decode(responseWithText("response"), String.class);
    assertThat(output).isEqualTo("RESPONSE");
}
Also used : StringDecoder(feign.codec.StringDecoder) ResponseMappingDecoder(feign.Feign.ResponseMappingDecoder) Test(org.junit.Test)

Aggregations

ResponseMappingDecoder (feign.Feign.ResponseMappingDecoder)5 Test (org.junit.Test)5 StringDecoder (feign.codec.StringDecoder)4