Class EnumArgumentsProvider
java.lang.Object
org.junit.jupiter.params.provider.AnnotationBasedArgumentsProvider<EnumSource>
org.junit.jupiter.params.provider.EnumArgumentsProvider
- All Implemented Interfaces:
Consumer<EnumSource>, ArgumentsProvider, AnnotationConsumer<EnumSource>
- Since:
- 5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetermineEnumClass(ParameterDeclarations parameters, EnumSource enumSource) getEnumConstants(ParameterDeclarations parameters, EnumSource enumSource) 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 AnnotationBasedArgumentsProvider
accept, provideArguments, provideArgumentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArgumentsProvider
provideArguments
-
Constructor Details
-
EnumArgumentsProvider
EnumArgumentsProvider()
-
-
Method Details
-
provideArguments
protected 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 Enum<E>> Set<? extends E> getEnumConstants(ParameterDeclarations parameters, EnumSource enumSource) -
determineEnumClass
private <E extends Enum<E>> Class<E> determineEnumClass(ParameterDeclarations parameters, EnumSource enumSource)
-