Annotation Type ClearSystemProperty
@ClearSystemProperty is a JUnit Jupiter extension to clear the value
of a system property for a test execution.
The key of the system property to be cleared must be specified via key().
After the annotated element has been executed, the original value or the value of the
higher-level container is restored.
ClearSystemProperty can be used on the method and on the class level.
It is repeatable and inherited from higher-level containers. If a class is
annotated, the configured property will be cleared before every test inside that
class.
During
parallel test execution,
all tests annotated with ClearSystemProperty, SetSystemProperty, ReadsSystemProperty, and WritesSystemProperty
are scheduled in a way that guarantees correctness under mutation of shared global state.
For more details and examples, see
the documentation on @ClearSystemProperty and @SetSystemProperty.
- Since:
- 0.5
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceContaining annotation of repeatable@ClearSystemProperty. -
Required Element Summary
Required Elements
-
Element Details
-
key
String keyThe key of the system property to be cleared.
-