Class EnumArgumentsProvider
- java.lang.Object
-
- org.junit.jupiter.params.provider.AnnotationBasedArgumentsProvider<EnumSource>
-
- org.junit.jupiter.params.provider.EnumArgumentsProvider
-
- All Implemented Interfaces:
java.util.function.Consumer<EnumSource>,ArgumentsProvider,AnnotationConsumer<EnumSource>
class EnumArgumentsProvider extends AnnotationBasedArgumentsProvider<EnumSource>
- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description EnumArgumentsProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private <E extends java.lang.Enum<E>>
java.lang.Class<E>determineEnumClass(ParameterDeclarations parameters, EnumSource enumSource)private <E extends java.lang.Enum<E>>
java.util.Set<? extends E>getEnumConstants(ParameterDeclarations parameters, EnumSource enumSource)protected java.util.stream.Stream<? extends Arguments>provideArguments(ParameterDeclarations parameters, org.junit.jupiter.api.extension.ExtensionContext context, EnumSource enumSource)The returnedStreamwill beproperly closedby the default implementation ofAnnotationBasedArgumentsProvider.provideArguments(ParameterDeclarations, ExtensionContext), making it safe to use a resource such asFiles.lines().-
Methods inherited from class org.junit.jupiter.params.provider.AnnotationBasedArgumentsProvider
accept, provideArguments, provideArguments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.junit.jupiter.params.provider.ArgumentsProvider
provideArguments
-
-
-
-
Method Detail
-
provideArguments
protected java.util.stream.Stream<? extends Arguments> provideArguments(ParameterDeclarations parameters, org.junit.jupiter.api.extension.ExtensionContext context, EnumSource enumSource)
Description copied from class:AnnotationBasedArgumentsProviderThe returnedStreamwill beproperly closedby the default implementation ofAnnotationBasedArgumentsProvider.provideArguments(ParameterDeclarations, ExtensionContext), making it safe to use a resource such asFiles.lines().- Overrides:
provideArgumentsin classAnnotationBasedArgumentsProvider<EnumSource>
-
getEnumConstants
private <E extends java.lang.Enum<E>> java.util.Set<? extends E> getEnumConstants(ParameterDeclarations parameters, EnumSource enumSource)
-
determineEnumClass
private <E extends java.lang.Enum<E>> java.lang.Class<E> determineEnumClass(ParameterDeclarations parameters, EnumSource enumSource)
-
-