This commit is contained in:
Phillip Webb
2019-07-14 17:39:45 +01:00
parent 8d4a2add63
commit cdf43a7489
6 changed files with 8 additions and 37 deletions

View File

@@ -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

View File

@@ -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">

View File

@@ -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() {