Enum ArgumentCountValidationMode
- All Implemented Interfaces:
Serializable, Comparable<ArgumentCountValidationMode>, java.lang.constant.Constable
@API(status=MAINTAINED,
since="5.13.3")
public enum ArgumentCountValidationMode
extends Enum<ArgumentCountValidationMode>
Enumeration of argument count validation modes for
@ParameterizedClass and
@ParameterizedTest.
When an ArgumentsSource provides more arguments than declared by
the parameterized class or method, there might be a bug in the class/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 Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArgumentCountValidationModeReturns the enum constant of this type with the specified name.static ArgumentCountValidationMode[]values()Returns an array containing the constants of this enum type, 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 parameterized class or method, these additional arguments are ignored.
-
STRICT
Use the strict argument count validation mode.When there are more arguments provided than declared by the parameterized class or method, this raises an error.
-
-
Constructor Details
-
ArgumentCountValidationMode
private ArgumentCountValidationMode()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-