Polish
This commit is contained in:
@@ -18,9 +18,9 @@ package org.springframework.boot.test.system;
|
||||
|
||||
/**
|
||||
* Provides access to {@link System#out System.out} and {@link System#err System.err}
|
||||
* output that has been captured by the {@link OutputCaptureExtension}. Can be used to
|
||||
* apply assertions either using AssertJ or standard JUnit assertions. For example:
|
||||
* <pre class="code">
|
||||
* output that has been captured by the {@link OutputCaptureExtension} or
|
||||
* {@link OutputCaptureRule}. Can be used to apply assertions either using AssertJ or
|
||||
* standard JUnit assertions. For example: <pre class="code">
|
||||
* assertThat(output).contains("started"); // Checks all output
|
||||
* assertThat(output.getErr()).contains("failed"); // Only checks System.err
|
||||
* assertThat(output.getOut()).contains("ok"); // Only checks System.put
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.extension.ParameterResolver;
|
||||
* parameter resolution} for a {@link CapturedOutput} instance which can be used to assert
|
||||
* that the correct output was written.
|
||||
* <p>
|
||||
* To use with {@link ExtendWith @ExtendWith}, inject the {@link CapturedOutput} as an
|
||||
* To use, add {@link ExtendWith @ExtendWith} and inject the {@link CapturedOutput} as an
|
||||
* argument to your test class constructor or test method:
|
||||
*
|
||||
* <pre class="code">
|
||||
|
||||
@@ -83,7 +83,7 @@ public class OutputCaptureRule implements TestRule, CapturedOutput {
|
||||
|
||||
/**
|
||||
* Resets the current capture session, clearing its captured output.
|
||||
* @deprecated since 2.2 with no replacement
|
||||
* @deprecated since 2.2.0 with no replacement
|
||||
*/
|
||||
@Deprecated
|
||||
public void reset() {
|
||||
|
||||
Reference in New Issue
Block a user