use of cn.taketoday.web.view.json.MappingJackson2JsonView in project today-infrastructure by TAKETODAY.
the class ViewResolverRegistryTests method contentNegotiation.
@Test
public void contentNegotiation() {
MappingJackson2JsonView view = new MappingJackson2JsonView();
this.registry.enableContentNegotiation(view);
ContentNegotiatingViewResolver resolver = checkAndGetResolver(ContentNegotiatingViewResolver.class);
assertThat(resolver.getDefaultViews()).isEqualTo(Arrays.asList(view));
assertThat(this.registry.getOrder()).isEqualTo(Ordered.HIGHEST_PRECEDENCE);
}
use of cn.taketoday.web.view.json.MappingJackson2JsonView in project today-framework by TAKETODAY.
the class ViewResolverRegistryTests method contentNegotiation.
@Test
public void contentNegotiation() {
MappingJackson2JsonView view = new MappingJackson2JsonView();
this.registry.enableContentNegotiation(view);
ContentNegotiatingViewResolver resolver = checkAndGetResolver(ContentNegotiatingViewResolver.class);
assertThat(resolver.getDefaultViews()).isEqualTo(Arrays.asList(view));
assertThat(this.registry.getOrder()).isEqualTo(Ordered.HIGHEST_PRECEDENCE);
}
Aggregations