Package de.cuioss.test.juli.junit5
Annotation Type EnableTestLogger
-
@Documented @Retention(RUNTIME) @Target(TYPE) @ExtendWith(TestLoggerController.class) public @interface EnableTestLogger
Meta-annotation that allows test classes to be extended withTestLoggerControllerinstead of using@ExtendWith(TestLoggerController.class).Used on a Junit 5 test this annotation ensures that the test-logger / assertion system is initialized properly, see
TestLoggerFactory.install(), andTestLoggerFactory.configureLogger(), and the actual log-statements are cleared before each test. After all tests the test-logger is uninstalled again, seeTestLoggerFactory.uninstall().Use the annotations for specifying the log-level to be set for the concrete unit-tests. The level defined within this annotation will overwrite settings found either within
System.getProperty(String)and "cui_logger.properties"Use
LogAssertsto make assertions to logged data.- Author:
- Oliver Wolff
-
-
Element Detail
-
rootLevel
TestLogLevel rootLevel
- Returns:
- The
TestLogLevelto be set before each test. It defaults toTestLogLevel.INFO
- Default:
- de.cuioss.test.juli.TestLogLevel.INFO
-
-
-
trace
Class<?>[] trace
- Returns:
- the types for which
TestLogLevel.TRACEwill be enabled, which implicitly maps toLevel.FINEST
- Default:
- {}
-
-
-
debug
Class<?>[] debug
- Returns:
- the types for which
TestLogLevel.DEBUGwill be enabled, which implicitly maps toLevel.FINE
- Default:
- {}
-
-
-
info
Class<?>[] info
- Returns:
- the types for which
TestLogLevel.INFOwill be enabled, which implicitly maps toLevel.INFO
- Default:
- {}
-
-
-
warn
Class<?>[] warn
- Returns:
- the types for which
TestLogLevel.WARNwill be enabled, which implicitly maps toLevel.WARNING
- Default:
- {}
-
-
-
error
Class<?>[] error
- Returns:
- the types for which
TestLogLevel.ERRORwill be enabled, which implicitly maps toLevel.SEVERE
- Default:
- {}
-
-