Details
-
Task
-
Resolution: Fixed
-
Major
-
11.7
-
None
-
Unknown
-
N/A
-
N/A
-
Description
Currently on version 1.3.
This will allow to use matchesPattern() for example:
assertThat(summary.getFailures().get(1).getException().getMessage(), matchesPattern( "There should be no content output to the console by the test! Instead we got \\[.* \\[main\\] " + "INFO o\\.x\\.t\\.j\\.CaptureConsoleExtensionTest\\$SampleTestCase - In beforeEach\n" + "\\]" ));
which provides much better error reporting than:
assertTrue(summary.getFailures().get(0).getException().getMessage().matches( "There should be no content output to the console by the test! Instead we got \\[.* \\[main\\] " + "INFO o\\.x\\.t\\.j\\.CaptureConsoleTestExecutionListenerTest\\$SampleTestCase - In beforeAll\n" + ".* \\[main\\] INFO o\\.x\\.t\\.j\\.CaptureConsoleTestExecutionListenerTest\\$SampleTestCase - " + "In outputToConsole\n" + "\\]" ));