Browse Source

Deprecate JUnit 4 OutputCaptureRule

Closes gh-47256
pull/47268/head
Phillip Webb 3 months ago
parent
commit
6642bf7beb
  1. 2
      core/spring-boot-test/src/main/java/org/springframework/boot/test/system/OutputCaptureRule.java
  2. 1
      core/spring-boot-test/src/test/java/org/springframework/boot/test/system/OutputCaptureRuleTests.java

2
core/spring-boot-test/src/main/java/org/springframework/boot/test/system/OutputCaptureRule.java

@ -50,7 +50,9 @@ import static org.hamcrest.Matchers.allOf;
* @author Phillip Webb * @author Phillip Webb
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 2.2.0 * @since 2.2.0
* @deprecated since 4.0.0 in favor of JUnit 5 and {@link OutputCaptureExtension}
*/ */
@Deprecated
public class OutputCaptureRule implements TestRule, CapturedOutput { public class OutputCaptureRule implements TestRule, CapturedOutput {
private final OutputCapture delegate = new OutputCapture(); private final OutputCapture delegate = new OutputCapture();

1
core/spring-boot-test/src/test/java/org/springframework/boot/test/system/OutputCaptureRuleTests.java

@ -26,6 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* *
* @author Roland Weisleder * @author Roland Weisleder
*/ */
@SuppressWarnings("deprecation")
public class OutputCaptureRuleTests { public class OutputCaptureRuleTests {
@Rule @Rule

Loading…
Cancel
Save