40.4.3 OutputCapture
OutputCapture
是JUnit的一个Rule
,用于捕获System.out
和System.err
输出,只需简单的将@Rule
注解capture,然后在断言中调用toString()
:
Last updated
Was this helpful?
OutputCapture
是JUnit的一个Rule
,用于捕获System.out
和System.err
输出,只需简单的将@Rule
注解capture,然后在断言中调用toString()
:
Last updated
Was this helpful?