Module org.junitpioneer
Annotation Type CartesianTest.Enum
-
@Retention(RUNTIME) @Target({PARAMETER,ANNOTATION_TYPE}) @CartesianArgumentsSource(CartesianEnumArgumentsProvider.class) public static @interface CartesianTest.EnumParameter annotation to be used withCartesianTestfor providing enum values.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description CartesianTest.Enum.ModemodeThe enum constant selection mode.java.lang.String[]namesThe names of enum constants to provide, or regular expressions to select the names of enum constants to provide.java.lang.Class<? extends java.lang.Enum<?>>valueThe enum type that serves as the source of the enum constants.
-
-
-
Element Detail
-
value
java.lang.Class<? extends java.lang.Enum<?>> 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.- Default:
- org.junitpioneer.jupiter.cartesian.CartesianEnumArgumentsProvider.NullEnum.class
-
-
-
names
java.lang.String[] names
The 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.- Default:
- {}
-
-
-
mode
CartesianTest.Enum.Mode mode
The enum constant selection mode.Defaults to
INCLUDE.- See Also:
CartesianTest.Enum.Mode.INCLUDE,CartesianTest.Enum.Mode.EXCLUDE,CartesianTest.Enum.Mode.MATCH_ALL,CartesianTest.Enum.Mode.MATCH_ANY,names()
- Default:
- org.junitpioneer.jupiter.cartesian.CartesianTest.Enum.Mode.INCLUDE
-
-