Package nl.pim16aap2.testing.logging
@NonNullByDefault
package nl.pim16aap2.testing.logging
This package contains a set of classes and utilities to capture and test logs in JUnit tests.
To use this package, you should use the WithLogCapture annotation on your test
class. This will capture all logs during the test and make them available for assertions.
Example code:
@WithLogCapture
class MyTest {
// LogCaptor is automatically injected by the extension
@Test
void test(LogCaptor logCaptor) {
// Your test code here
}
}
-
ClassDescriptionRepresents a set of utility methods to assert logs.Represents a specification of an assertion for a log event.Builder class for
LogAssertionsUtil.LogAssertion.Represents a specification for an expected exception.Represents a specification for an expected exception.A JUnit 5 extension to capture logs during tests.An annotation to be used on test classes to capture logs.