Search in sources :

Example 21 with ConversionService

use of org.springframework.core.convert.ConversionService 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);
}
Also used : ConversionService(org.springframework.core.convert.ConversionService) DefaultConversionService(org.springframework.core.convert.support.DefaultConversionService) ServletServerHttpResponse(org.springframework.http.server.ServletServerHttpResponse) DefaultConversionService(org.springframework.core.convert.support.DefaultConversionService) MockHttpServletResponse(org.springframework.mock.web.test.MockHttpServletResponse) Before(org.junit.Before)

Aggregations

ConversionService (org.springframework.core.convert.ConversionService)21 Test (org.junit.Test)11 DefaultConversionService (org.springframework.core.convert.support.DefaultConversionService)5 TypeDescriptor (org.springframework.core.convert.TypeDescriptor)4 ApplicationContext (org.springframework.context.ApplicationContext)3 LocalValidatorFactoryBean (org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)3 WebDataBinder (org.springframework.web.bind.WebDataBinder)3 ConfigurableWebBindingInitializer (org.springframework.web.bind.support.ConfigurableWebBindingInitializer)3 Collection (java.util.Collection)2 Map (java.util.Map)2 ConversionFailedException (org.springframework.core.convert.ConversionFailedException)2 StandardEvaluationContext (org.springframework.expression.spel.support.StandardEvaluationContext)2 StandardTypeConverter (org.springframework.expression.spel.support.StandardTypeConverter)2 FormattingConversionService (org.springframework.format.support.FormattingConversionService)2 Validator (org.springframework.validation.Validator)2 WebDataBinderFactory (org.springframework.web.bind.support.WebDataBinderFactory)2 RequestMappingHandlerAdapter (org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter)2 RequestMappingHandlerAdapter (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter)2 FAIL_ON_UNKNOWN_PROPERTIES (com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)1 DEFAULT_VIEW_INCLUSION (com.fasterxml.jackson.databind.MapperFeature.DEFAULT_VIEW_INCLUSION)1