public class GenericContentResult<T> extends BaseResult
| Modifier and Type | Field and Description |
|---|---|
protected T |
content |
protected org.springframework.test.web.servlet.ResultActions |
resultActions |
mockResponse| Constructor and Description |
|---|
GenericContentResult(MockResponse mockResponse,
org.springframework.test.web.servlet.ResultActions resultActions,
T content)
构造函数
|
| Modifier and Type | Method and Description |
|---|---|
T |
get() |
MockResponse |
is(Consumer<T> expectedValidateFun)
可自定义验证方法
|
endprotected final org.springframework.test.web.servlet.ResultActions resultActions
protected final T content
public GenericContentResult(MockResponse mockResponse, org.springframework.test.web.servlet.ResultActions resultActions, T content)
mockResponse - 模拟响应resultActions - 模拟返回操作content - 响应内容public T get()
public MockResponse is(Consumer<T> expectedValidateFun)
expectedValidateFun - 预期值的验证函数Copyright © 2021–2022 EasyJ开源社区. All rights reserved.