类 OutputCapture
- java.lang.Object
- org.springframework.boot.test.rule.OutputCapture
- 所有已实现的接口:
org.junit.rules.TestRule
public class OutputCapture extends Object implements org.junit.rules.TestRule
JUnit@Rule
to capture output from System.out and System.err.- 从以下版本开始:
- 1.4.0
构造器概要
构造器 构造器 说明 OutputCapture()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
protected void
captureOutput()
void
expect(org.hamcrest.Matcher<? super String> matcher)
Verify that the output is matched by the suppliedmatcher
.void
flush()
protected void
releaseOutput()
void
reset()
Discard all currently accumulated output.String
toString()
构造器详细资料
OutputCapture
public OutputCapture()
方法详细资料
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
- 指定者:
apply
在接口中org.junit.rules.TestRule
captureOutput
protected void captureOutput()
releaseOutput
protected void releaseOutput()
reset
public void reset()
Discard all currently accumulated output.
flush
public void flush()