use of org.springframework.core.convert.support.DefaultConversionService in project spring-framework by spring-projects.
the class ObjectToStringHttpMessageConverterTests method defaultCharsetModified.
@Test
public void defaultCharsetModified() throws IOException {
ConversionService cs = new DefaultConversionService();
ObjectToStringHttpMessageConverter converter = new ObjectToStringHttpMessageConverter(cs, StandardCharsets.UTF_16);
converter.write((byte) 31, null, this.response);
assertEquals("UTF-16", this.servletResponse.getCharacterEncoding());
}
use of org.springframework.core.convert.support.DefaultConversionService in project spring-framework by spring-projects.
the class ObjectToStringHttpMessageConverterTests method setUp.
@Before
public void setUp() {
ConversionService conversionService = new DefaultConversionService();
this.converter = new ObjectToStringHttpMessageConverter(conversionService);
this.servletResponse = new MockHttpServletResponse();
this.response = new ServletServerHttpResponse(this.servletResponse);
}
Aggregations