Search in sources :

Example 56 with ModelAndView

use of cn.taketoday.web.view.ModelAndView in project today-infrastructure by TAKETODAY.

the class ParameterizableViewControllerTests method viewName.

@Test
public void viewName() throws Exception {
    this.controller.setViewName("view");
    ModelAndView modelAndView = this.controller.handleRequest(this.context);
    assertThat(modelAndView.getViewName()).isEqualTo("view");
}
Also used : ModelAndView(cn.taketoday.web.view.ModelAndView) Test(org.junit.jupiter.api.Test)

Aggregations

ModelAndView (cn.taketoday.web.view.ModelAndView)56 Test (org.junit.jupiter.api.Test)28 ServletRequestContext (cn.taketoday.web.servlet.ServletRequestContext)26 MockServletRequestContext (cn.taketoday.web.servlet.MockServletRequestContext)24 PathPatternsParameterizedTest (cn.taketoday.web.view.PathPatternsParameterizedTest)24 RequestContext (cn.taketoday.web.RequestContext)22 RedirectModel (cn.taketoday.web.view.RedirectModel)6 BindingContext (cn.taketoday.web.BindingContext)4 StaticWebApplicationContext (cn.taketoday.web.context.support.StaticWebApplicationContext)4 MockHttpServletRequest (cn.taketoday.web.mock.MockHttpServletRequest)2 MockHttpServletResponse (cn.taketoday.web.mock.MockHttpServletResponse)2 MockHttpServletRequest (cn.taketoday.web.testfixture.servlet.MockHttpServletRequest)2 MockHttpServletResponse (cn.taketoday.web.testfixture.servlet.MockHttpServletResponse)2 RedirectView (cn.taketoday.web.view.RedirectView)2 View (cn.taketoday.web.view.View)2