Search in sources :

Example 11 with BodyDeserializer

use of com.tvd12.ezyhttp.core.codec.BodyDeserializer in project ezyhttp by youngmonkeys.

the class DataConvertersTest method getBodyDeserializerWithUTF8Test.

@Test
public void getBodyDeserializerWithUTF8Test() {
    // given
    DataConverters sut = new DataConverters(new ObjectMapper());
    String contentType = ContentTypes.TEXT_HTML_UTF8;
    // when
    BodyDeserializer actual = sut.getBodyDeserializer(contentType);
    // then
    Asserts.assertEquals(TextBodyConverter.class, actual.getClass());
}
Also used : BodyDeserializer(com.tvd12.ezyhttp.core.codec.BodyDeserializer) DataConverters(com.tvd12.ezyhttp.core.codec.DataConverters) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.testng.annotations.Test)

Aggregations

BodyDeserializer (com.tvd12.ezyhttp.core.codec.BodyDeserializer)11 Test (org.testng.annotations.Test)9 InputStream (java.io.InputStream)5 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 HttpClient (com.tvd12.ezyhttp.client.HttpClient)3 DataConverters (com.tvd12.ezyhttp.core.codec.DataConverters)3 IOException (java.io.IOException)3 BeforeTest (org.testng.annotations.BeforeTest)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 HashMap (java.util.HashMap)2 EzyProcessor.processWithLogException (com.tvd12.ezyfox.util.EzyProcessor.processWithLogException)1 DownloadCancelledException (com.tvd12.ezyhttp.client.exception.DownloadCancelledException)1 MultiValueMap (com.tvd12.ezyhttp.core.data.MultiValueMap)1 DeserializeBodyException (com.tvd12.ezyhttp.core.exception.DeserializeBodyException)1 DeserializeCookieException (com.tvd12.ezyhttp.core.exception.DeserializeCookieException)1 DeserializeHeaderException (com.tvd12.ezyhttp.core.exception.DeserializeHeaderException)1 DeserializeParameterException (com.tvd12.ezyhttp.core.exception.DeserializeParameterException)1 DeserializePathVariableException (com.tvd12.ezyhttp.core.exception.DeserializePathVariableException)1 HttpBadRequestException (com.tvd12.ezyhttp.core.exception.HttpBadRequestException)1 Map (java.util.Map)1