Top Fields Constructors Methods
org.junit.jupiter.params

pack-priv Class ParameterizedTestExtension

extends ParameterizedInvocationContextProvider<ParameterizedTestInvocationContext>
implements TestTemplateInvocationContextProvider
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider, org.junit.jupiter.api.extension.Extension
Static Imports
java.util.Objects.requireNonNull, org.junit.platform.commons.support.AnnotationSupport.findAnnotation

Since
5.0

Field Summary

Modifier and TypeField and Description
pack-priv static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private ParameterizedTestContext
private ExtensionContext.Store
public boolean
mayReturnZeroTestTemplateInvocationContexts(ExtensionContext extensionContext)

Overrides default org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider.mayReturnZeroTestTemplateInvocationContexts.

Signal that this provider may provide zero invocation contexts for the test template method represented by the supplied context.

public Stream<ParameterizedTestInvocationContext>
public boolean
supportsTestTemplate(ExtensionContext context)

Implements org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider.supportsTestTemplate.

Determine if this provider supports providing invocation contexts for the test template method represented by the supplied context.

Inherited from org.junit.jupiter.params.ParameterizedInvocationContextProvider:
argumentsprovideInvocationContexts

Field Detail

DECLARATION_CONTEXT_KEYback to summary
pack-priv static final String DECLARATION_CONTEXT_KEY

Constructor Detail

ParameterizedTestExtensionback to summary
pack-priv ParameterizedTestExtension()

Method Detail

getDeclarationContextback to summary
private ParameterizedTestContext getDeclarationContext(ExtensionContext extensionContext)
getStoreback to summary
private ExtensionContext.Store getStore(ExtensionContext context)
mayReturnZeroTestTemplateInvocationContextsback to summary
public boolean mayReturnZeroTestTemplateInvocationContexts(ExtensionContext extensionContext)

Overrides default org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider.mayReturnZeroTestTemplateInvocationContexts.

Doc from org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider.mayReturnZeroTestTemplateInvocationContexts.

Signal that this provider may provide zero invocation contexts for the test template method represented by the supplied context.

If this method returns false (which is the default) and the provider returns an empty stream from provideTestTemplateInvocationContexts, this will be considered an execution error. Override this method to return true to ignore the absence of invocation contexts for this provider.

Annotations
@Override
provideTestTemplateInvocationContextsback to summary
public Stream<ParameterizedTestInvocationContext> provideTestTemplateInvocationContexts(ExtensionContext extensionContext)

Implements org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider.provideTestTemplateInvocationContexts.

Doc from org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider.provideTestTemplateInvocationContexts.

Provide invocation contexts for the test template method represented by the supplied context.

This method is only called by the framework if supportsTestTemplate previously returned true for the same ExtensionContext; this method is allowed to return an empty Stream but not null.

The returned Stream will be properly closed by calling Stream#close(), making it safe to use a resource such as Files.lines().

Annotations
@Override
supportsTestTemplateback to summary
public boolean supportsTestTemplate(ExtensionContext context)

Implements org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider.supportsTestTemplate.

Doc from org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider.supportsTestTemplate.

Determine if this provider supports providing invocation contexts for the test template method represented by the supplied context.

Annotations
@Override