Class ViewResultMatchers
- java.lang.Object
- org.springframework.test.web.servlet.result.ViewResultMatchers
public class ViewResultMatchers extends Object
Factory for assertions on the selected view.An instance of this class is typically accessed via
MockMvcResultMatchers.view()
.- Since:
- 3.2
- Author:
- Rossen Stoyanchev
Constructor Summary
Constructors Modifier Constructor Description protected
ViewResultMatchers()
Protected constructor.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultMatcher
name(String expectedViewName)
Assert the selected view name.ResultMatcher
name(Matcher<? super String> matcher)
Assert the selected view name with the given HamcrestMatcher
.
Constructor Detail
ViewResultMatchers
protected ViewResultMatchers()
Protected constructor. UseMockMvcResultMatchers.view()
.
Method Detail
name
public ResultMatcher name(Matcher<? super String> matcher)
Assert the selected view name with the given HamcrestMatcher
.
name
public ResultMatcher name(String expectedViewName)
Assert the selected view name.