Example usage for org.springframework.format.support FormattingConversionService addConverter

List of usage examples for org.springframework.format.support FormattingConversionService addConverter

Introduction

In this page you can find the example usage for org.springframework.format.support FormattingConversionService addConverter.

Prototype

@Override
    public void addConverter(Converter<?, ?> converter) 

Source Link

Usage

From source file:com.crossover.trial.weather.endpoint.RestWeatherQueryEndpointTest.java

@Before
public void setup() {
    FormattingConversionService converter = new FormattingConversionService();
    converter.addConverter(new DataPointTypeConverter());
    converter.addConverter(new IATASpringConverter());
    mockMvc = MockMvcBuilders.standaloneSetup(queryEndpoint, collectorEndpoint).setConversionService(converter)
            .build();/*from w ww. j  a va2  s. co m*/
}

From source file:com.crossover.trial.weather.endpoint.RestWeatherCollectorEndpointTest.java

@Before
public void setup() {
    FormattingConversionService converter = new FormattingConversionService();
    converter.addConverter(new DataPointTypeConverter());
    converter.addConverter(new IATASpringConverter());
    mockMvc = MockMvcBuilders.standaloneSetup(endpoint).setConversionService(converter).build();
}