Class CartesianEnumArgumentsProvider<E extends Enum<E>>
java.lang.Object
org.junitpioneer.jupiter.cartesian.CartesianEnumArgumentsProvider<E>
- All Implemented Interfaces:
CartesianArgumentsProvider, CartesianParameterArgumentsProvider<E>
class CartesianEnumArgumentsProvider<E extends Enum<E>>
extends Object
implements CartesianParameterArgumentsProvider<E>
This is basically an enhanced copy of Jupiter's
EnumArgumentsProvider,
except it does NOT support @ParameterizedTest and implements
CartesianParameterArgumentsProvider for use with @CartesianTest.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetermineEnumClass(CartesianTest.Enum enumSource, Class<?> parameterType) getEnumConstants(CartesianTest.Enum enumSource, Class<?> parameterType) provideArguments(org.junit.jupiter.api.extension.ExtensionContext context, Parameter parameter) Provides aStreamof arguments that needs to be used for aCartesianTestparameter.
-
Constructor Details
-
CartesianEnumArgumentsProvider
CartesianEnumArgumentsProvider()
-
-
Method Details
-
provideArguments
public Stream<E> provideArguments(org.junit.jupiter.api.extension.ExtensionContext context, Parameter parameter) Description copied from interface:CartesianParameterArgumentsProviderProvides aStreamof arguments that needs to be used for aCartesianTestparameter.- Specified by:
provideArgumentsin interfaceCartesianParameterArgumentsProvider<E extends Enum<E>>- Parameters:
context- the current extension contextparameter- the parameter for which the arguments have to be provided- Returns:
- a stream of arguments
-
getEnumConstants
-
determineEnumClass
-