This commit is contained in:
Madhura Bhave 2019-06-12 17:48:33 -07:00
parent 54c72cf39f
commit 30cfe7b4c5
2 changed files with 2 additions and 6 deletions

View File

@ -126,9 +126,7 @@ class OutputCapture implements CapturedOutput {
} }
private String get(Predicate<Type> filter) { private String get(Predicate<Type> filter) {
Assert.state(!this.systemCaptures.isEmpty(), Assert.state(!this.systemCaptures.isEmpty(), "No system captures found. Check that you have used @ExtendWith.");
"No system captures found. Check that you have used @RegisterExtension "
+ "or @ExtendWith and the fields are not private");
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
for (SystemCapture systemCapture : this.systemCaptures) { for (SystemCapture systemCapture : this.systemCaptures) {
systemCapture.append(builder, filter); systemCapture.append(builder, filter);

View File

@ -113,9 +113,7 @@ class OutputCapture implements CapturedOutput {
} }
private String get(Predicate<Type> filter) { private String get(Predicate<Type> filter) {
Assert.state(!this.systemCaptures.isEmpty(), Assert.state(!this.systemCaptures.isEmpty(), "No system captures found. Check that you have used @ExtendWith.");
"No system captures found. Check that you have used @RegisterExtension "
+ "or @ExtendWith and the fields are not private");
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
for (SystemCapture systemCapture : this.systemCaptures) { for (SystemCapture systemCapture : this.systemCaptures) {
systemCapture.append(builder, filter); systemCapture.append(builder, filter);