Annotation Type CartesianTest.Enum
- Enclosing class:
CartesianTest
@Retention(RUNTIME)
@Target({PARAMETER,ANNOTATION_TYPE})
@CartesianArgumentsSource(CartesianEnumArgumentsProvider.class)
public static @interface CartesianTest.Enum
Parameter annotation to be used with
CartesianTest for providing enum values.- Since:
- 1.5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of modes for selecting enum constants by name. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe enum constant selection mode.String[]The names of enum constants to provide, or regular expressions to select the names of enum constants to provide.The enum type that serves as the source of the enum constants.
-
Element Details
-
value
The enum type that serves as the source of the enum constants.If this attribute is not set explicitly, the declared type of the parameter of the
@CartesianProductTestmethod, which has the same relative index of the annotation, is used.For example, in case of the following test:
the first@CartesianProductTest @CartesianTest.Enum @CartesianTest.Enum void multipleOmittedTypes(FirstEnum e1, SecondEnum e2) { ... }@CartesianTest.Enumannotation will provide all the values ofFirstEnum, while the second annotation will provide all the values ofSecondEnum.- See Also:
- Default:
org.junitpioneer.jupiter.cartesian.CartesianEnumArgumentsProvider.NullEnum.class
-
names
String[] namesThe names of enum constants to provide, or regular expressions to select the names of enum constants to provide.If no names or regular expressions are specified, all enum constants declared in the specified enum type will be provided.
The
mode()determines how the names are interpreted.- See Also:
- Default:
{}
-
mode
-