@ClearSystemProperty and @SetSystemProperty
The @ClearSystemProperty and @SetSystemProperty annotations can be used to clear and set, respectively, the values of system properties for a test execution.
Both annotations work on the test method and class level, are repeatable, combinable, and inherited from higher-level containers.
After the annotated method has been executed, the properties mentioned in the annotation will be restored to their original value or the value of the higher-level container, or will be cleared if they didn’t have one before.
|
Warning
|
This extension was contributed to the JUnit Framework and is available since JUnit version 6.1.0. Therefore, it was removed from JUnit Pioneer. |