Top Description Fields Constructors Methods
org.junit.jupiter.params

public final Enum ArgumentCountValidationMode

extends Enum<ArgumentCountValidationMode>
Class Inheritance
Annotations
@API
status:MAINTAINED
since:5.13.3
Static Imports
org.apiguardian.api.API.Status.MAINTAINED

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
ParameterizedClass#argumentCountValidation(), ParameterizedTest#argumentCountValidation()

Field Summary

Modifier and TypeField and Description
public static final ArgumentCountValidationMode
DEFAULT

Use the default validation mode.

public static final ArgumentCountValidationMode
NONE

Use the "none" argument count validation mode.

public static final ArgumentCountValidationMode
STRICT

Use the strict argument count validation mode.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ArgumentCountValidationMode
public static ArgumentCountValidationMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEFAULTback to summary
public static final ArgumentCountValidationMode 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).

NONEback to summary
public static final ArgumentCountValidationMode 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.

STRICTback to summary
public static final ArgumentCountValidationMode 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 Detail

ArgumentCountValidationModeback to summary
private ArgumentCountValidationMode()

Method Detail

valueOfback to summary
public static ArgumentCountValidationMode valueOf(String name)
valuesback to summary
public static ArgumentCountValidationMode[] values()