Search in sources :

Example 1 with HttpMessageWriterView

use of org.springframework.web.reactive.result.view.HttpMessageWriterView in project spring-framework by spring-projects.

the class ViewResolverRegistryTests method defaultViews.

@Test
public void defaultViews() throws Exception {
    View view = new HttpMessageWriterView(new Jackson2JsonEncoder());
    this.registry.defaultViews(view);
    assertThat(this.registry.getDefaultViews().size()).isEqualTo(1);
    assertThat(this.registry.getDefaultViews().get(0)).isSameAs(view);
}
Also used : HttpMessageWriterView(org.springframework.web.reactive.result.view.HttpMessageWriterView) HttpMessageWriterView(org.springframework.web.reactive.result.view.HttpMessageWriterView) View(org.springframework.web.reactive.result.view.View) Jackson2JsonEncoder(org.springframework.http.codec.json.Jackson2JsonEncoder) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 Jackson2JsonEncoder (org.springframework.http.codec.json.Jackson2JsonEncoder)1 HttpMessageWriterView (org.springframework.web.reactive.result.view.HttpMessageWriterView)1 View (org.springframework.web.reactive.result.view.View)1