Package org.junit.platform.engine
Enum TestDescriptor.Type
- java.lang.Object
-
- java.lang.Enum<TestDescriptor.Type>
-
- org.junit.platform.engine.TestDescriptor.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<TestDescriptor.Type>
- Enclosing interface:
- TestDescriptor
public static enum TestDescriptor.Type extends Enum<TestDescriptor.Type>
Supported types forTestDescriptors
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTAINER
Denotes that theTestDescriptor
is for a container.CONTAINER_AND_TEST
Denotes that theTestDescriptor
is for a test that may potentially also be a container.TEST
Denotes that theTestDescriptor
is for a test.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isContainer()
boolean
isTest()
static TestDescriptor.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static TestDescriptor.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONTAINER
public static final TestDescriptor.Type CONTAINER
Denotes that theTestDescriptor
is for a container.
-
TEST
public static final TestDescriptor.Type TEST
Denotes that theTestDescriptor
is for a test.
-
CONTAINER_AND_TEST
public static final TestDescriptor.Type CONTAINER_AND_TEST
Denotes that theTestDescriptor
is for a test that may potentially also be a container.
-
-
Method Detail
-
values
public static TestDescriptor.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TestDescriptor.Type c : TestDescriptor.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TestDescriptor.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isContainer
public boolean isContainer()
- Returns:
true
if this type represents a descriptor that can contain other descriptors
-
isTest
public boolean isTest()
- Returns:
true
if this type represents a descriptor for a test
-
-