类 FlashAttributeResultMatchers
- java.lang.Object
- org.springframework.test.web.servlet.result.FlashAttributeResultMatchers
public class FlashAttributeResultMatchers extends Object
Factory for "output" flash attribute assertions.An instance of this class is typically accessed via
MockMvcResultMatchers.flash()
.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 限定符 构造器 说明 protected
FlashAttributeResultMatchers()
Protected constructor.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ResultMatcher
attribute(String name, Object value)
Assert a flash attribute's value.<T> ResultMatcher
attribute(String name, Matcher<T> matcher)
Assert a flash attribute's value with the given HamcrestMatcher
.ResultMatcher
attributeCount(int count)
Assert the number of flash attributes.ResultMatcher
attributeExists(String... names)
Assert the existence of the given flash attributes.
构造器详细资料
FlashAttributeResultMatchers
protected FlashAttributeResultMatchers()
Protected constructor. UseMockMvcResultMatchers.flash()
.
方法详细资料
attribute
public <T> ResultMatcher attribute(String name, Matcher<T> matcher)
Assert a flash attribute's value with the given HamcrestMatcher
.
attribute
public ResultMatcher attribute(String name, Object value)
Assert a flash attribute's value.
attributeExists
public ResultMatcher attributeExists(String... names)
Assert the existence of the given flash attributes.
attributeCount
public ResultMatcher attributeCount(int count)
Assert the number of flash attributes.