Polish "Polish OutputCapture and its JUnit Jupiter extension"
See gh-17049
This commit is contained in:
@@ -39,7 +39,6 @@ import org.springframework.util.ClassUtils;
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
* @author Sam Brannen
|
||||
* @since 2.2.0
|
||||
* @see OutputCaptureExtension
|
||||
* @see OutputCaptureRule
|
||||
*/
|
||||
@@ -128,11 +127,7 @@ class OutputCapture implements CapturedOutput {
|
||||
|
||||
private String get(Predicate<Type> filter) {
|
||||
Assert.state(!this.systemCaptures.isEmpty(),
|
||||
"No system captures found. When using JUnit 4, ensure that you have "
|
||||
+ "registered the OutputCaptureRule via @ClassRule or @Rule "
|
||||
+ "and that the field is public. "
|
||||
+ "When using JUnit Jupiter, ensure that you have registered "
|
||||
+ "the OutputCaptureExtension via @ExtendWith.");
|
||||
"No system captures found. Please check your output capture registration.");
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (SystemCapture systemCapture : this.systemCaptures) {
|
||||
systemCapture.append(builder, filter);
|
||||
|
||||
Reference in New Issue
Block a user