Polish "Polish OutputCapture and its JUnit Jupiter extension"

See gh-17049
This commit is contained in:
Andy Wilkinson
2019-07-18 17:46:28 +01:00
parent e1c595a67f
commit 41957ec2ad
3 changed files with 50 additions and 18 deletions

View File

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