public enum OperatingSystemRestriction extends Enum<OperatingSystemRestriction>
Do not call these methods in a static initializer block as this marks the test as failed.
Modifier and Type | Method and Description |
---|---|
static void |
forbid(String reason,
OperatingSystem... forbiddenSystems)
Forbids the execution on the given set of operating systems.
|
static void |
restrictTo(String reason,
OperatingSystem... operatingSystems)
Restricts the execution to the given set of operating systems.
|
static OperatingSystemRestriction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OperatingSystemRestriction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static OperatingSystemRestriction[] values()
for (OperatingSystemRestriction c : OperatingSystemRestriction.values()) System.out.println(c);
public static OperatingSystemRestriction valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static void restrictTo(String reason, OperatingSystem... operatingSystems) throws org.junit.AssumptionViolatedException
reason
- reason for the restrictionoperatingSystems
- allowed operating systemsorg.junit.AssumptionViolatedException
- if this method is called on a forbidden operating systempublic static void forbid(String reason, OperatingSystem... forbiddenSystems) throws org.junit.AssumptionViolatedException
reason
- reason for the restrictionforbiddenSystems
- forbidden operating systemsorg.junit.AssumptionViolatedException
- if this method is called on a forbidden operating systemCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.