class RepeatedTestExtension extends java.lang.Object implements TestTemplateInvocationContextProvider
TestTemplateInvocationContextProvider that supports the
@RepeatedTest annotation.| Constructor and Description |
|---|
RepeatedTestExtension() |
| Modifier and Type | Method and Description |
|---|---|
private RepeatedTestDisplayNameFormatter |
displayNameFormatter(RepeatedTest repeatedTest,
java.lang.reflect.Method method,
java.lang.String displayName) |
private int |
failureThreshold(RepeatedTest repeatedTest,
java.lang.reflect.Method method) |
java.util.stream.Stream<TestTemplateInvocationContext> |
provideTestTemplateInvocationContexts(ExtensionContext context)
Provide invocation contexts
for the test template method represented by the supplied
context. |
boolean |
supportsTestTemplate(ExtensionContext context)
Determine if this provider supports providing invocation contexts for the
test template method represented by the supplied
context. |
private int |
totalRepetitions(RepeatedTest repeatedTest,
java.lang.reflect.Method method) |
public boolean supportsTestTemplate(ExtensionContext context)
TestTemplateInvocationContextProvidercontext.supportsTestTemplate in interface TestTemplateInvocationContextProvidercontext - the extension context for the test template method about
to be invoked; never nulltrue if this provider can provide invocation contextsTestTemplateInvocationContextProvider.provideTestTemplateInvocationContexts(org.junit.jupiter.api.extension.ExtensionContext),
ExtensionContextpublic java.util.stream.Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContexts(ExtensionContext context)
TestTemplateInvocationContextProvidercontext.
This method is only called by the framework if TestTemplateInvocationContextProvider.supportsTestTemplate(org.junit.jupiter.api.extension.ExtensionContext)
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
BaseStream.close(), making it safe to use a resource such as
Files.lines().
provideTestTemplateInvocationContexts in interface TestTemplateInvocationContextProvidercontext - the extension context for the test template method about
to be invoked; never nullStream of TestTemplateInvocationContext
instances for the invocation of the test template method; never nullTestTemplateInvocationContextProvider.supportsTestTemplate(org.junit.jupiter.api.extension.ExtensionContext),
ExtensionContextprivate int totalRepetitions(RepeatedTest repeatedTest, java.lang.reflect.Method method)
private int failureThreshold(RepeatedTest repeatedTest, java.lang.reflect.Method method)
private RepeatedTestDisplayNameFormatter displayNameFormatter(RepeatedTest repeatedTest, java.lang.reflect.Method method, java.lang.String displayName)