@Retention(value=RUNTIME) @Target(value={METHOD,TYPE}) @Repeatable(value=ClearSystemProperty.ClearSystemProperties.class) @ExtendWith(value=org.junitpioneer.jupiter.SystemPropertyExtension.class) public @interface 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, After the
annotated method has been executed, the initial default value is restored.
ClearSystemProperty
is repeatable and can be used on the method and
on the class level. If a class is annotated, the configured property will be
cleared for all tests inside that class.
For more details and examples, see
the documentation on @ClearSystemProperty and @SetSystemProperty
.
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
key
The key of the system property to be cleared.
|