类 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()
.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 限定符 构造器 说明 protected
ViewResultMatchers()
Protected constructor.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ResultMatcher
name(String expectedViewName)
Assert the selected view name.ResultMatcher
name(Matcher<? super String> matcher)
Assert the selected view name with the given HamcrestMatcher
.
构造器详细资料
ViewResultMatchers
protected ViewResultMatchers()
Protected constructor. UseMockMvcResultMatchers.view()
.
方法详细资料
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.