Module org.junit.jupiter.params
Package org.junit.jupiter.params
Enum Class ArgumentCountValidationMode
- All Implemented Interfaces:
Serializable
,Comparable<ArgumentCountValidationMode>
,Constable
@API(status=EXPERIMENTAL,
since="5.12")
public enum ArgumentCountValidationMode
extends Enum<ArgumentCountValidationMode>
Enumeration of argument count validation modes for
@ParameterizedTest
.
When an ArgumentsSource
provides more arguments than declared by the test method,
there might be a bug in the test method or the ArgumentsSource
.
By default, the additional arguments are ignored.
ArgumentCountValidationMode
allows you to control how additional arguments are handled.
- Since:
- 5.12
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArgumentCountValidationMode
Returns the enum constant of this class with the specified name.static ArgumentCountValidationMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Use the default validation mode.The default validation mode may be changed via the "junit.jupiter.params.argumentCountValidation" configuration parameter (see the User Guide for details on configuration parameters).
-
NONE
Use the "none" argument count validation mode.When there are more arguments provided than declared by the test method, these additional arguments are ignored.
-
STRICT
Use the strict argument count validation mode.When there are more arguments provided than declared by the test method, this raises an error.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-