类 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@Ruleto capture output from System.out and System.err.- 从以下版本开始:
 - 1.4.0
 
构造器概要
构造器 构造器 说明 OutputCapture()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.junit.runners.model.Statementapply(org.junit.runners.model.Statement base, org.junit.runner.Description description)protected voidcaptureOutput()voidexpect(org.hamcrest.Matcher<? super String> matcher)Verify that the output is matched by the suppliedmatcher.voidflush()protected voidreleaseOutput()voidreset()Discard all currently accumulated output.StringtoString()
构造器详细资料
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()