Search in sources :

Example 1 with SpringHandlerInstantiator

use of org.springframework.http.converter.json.SpringHandlerInstantiator in project spring-framework by spring-projects.

the class StandaloneMockMvcBuilderTests method springHandlerInstantiator.

// SPR-13375
@Test
@SuppressWarnings("rawtypes")
public void springHandlerInstantiator() {
    TestStandaloneMockMvcBuilder builder = new TestStandaloneMockMvcBuilder(new PersonController());
    builder.build();
    SpringHandlerInstantiator instantiator = new SpringHandlerInstantiator(builder.wac.getAutowireCapableBeanFactory());
    JsonSerializer serializer = instantiator.serializerInstance(null, null, UnknownSerializer.class);
    assertNotNull(serializer);
}
Also used : JsonSerializer(com.fasterxml.jackson.databind.JsonSerializer) SpringHandlerInstantiator(org.springframework.http.converter.json.SpringHandlerInstantiator) Test(org.junit.Test)

Aggregations

JsonSerializer (com.fasterxml.jackson.databind.JsonSerializer)1 Test (org.junit.Test)1 SpringHandlerInstantiator (org.springframework.http.converter.json.SpringHandlerInstantiator)1