Package org.junit.jupiter.api.condition
Annotation Type EnabledIfSystemProperty
-
@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @ExtendWith(org.junit.jupiter.api.condition.EnabledIfSystemPropertyCondition.class) @API(status=STABLE, since="5.1") public @interface EnabledIfSystemProperty
@EnabledIfSystemProperty
is used to signal that the annotated test class or test method is only enabled if the value of the specified system property matches the specified regular expression.When declared at the class level, the result will apply to all test methods within that class as well.
If the specified system property is undefined, the annotated class or method will be disabled.
- Since:
- 5.1
- See Also:
Disabled
,EnabledIf
,EnabledIfEnvironmentVariable
,EnabledOnJre
,EnabledOnOs
,DisabledIf
,DisabledIfEnvironmentVariable
,DisabledIfSystemProperty
,DisabledOnJre
,DisabledOnOs
-
-
-
matches
java.lang.String matches
A regular expression that will be used to match against the retrieved value of thenamed()
JVM system property.- Returns:
- the regular expression; never blank
- See Also:
String.matches(String)
,Pattern
-
-