Class TestCaseInvocationContextProvider
- java.lang.Object
-
- org.apache.flink.connector.testframe.junit.extensions.TestCaseInvocationContextProvider
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
@Internal public class TestCaseInvocationContextProvider extends Object implements org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
A helper class for injecting test resources into test case as parameters.This provider will resolve
TestEnvironment
andExternalContextFactory
from the storage in JUnit'sExtensionContext
, inject them into test method, and register aAfterTestExecutionCallback
for closing the external context after the execution of test case.
-
-
Constructor Summary
Constructors Constructor Description TestCaseInvocationContextProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<org.junit.jupiter.api.extension.TestTemplateInvocationContext>
provideTestTemplateInvocationContexts(org.junit.jupiter.api.extension.ExtensionContext context)
boolean
supportsTestTemplate(org.junit.jupiter.api.extension.ExtensionContext context)
-
-
-
Method Detail
-
supportsTestTemplate
public boolean supportsTestTemplate(org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
supportsTestTemplate
in interfaceorg.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
-
provideTestTemplateInvocationContexts
public Stream<org.junit.jupiter.api.extension.TestTemplateInvocationContext> provideTestTemplateInvocationContexts(org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
provideTestTemplateInvocationContexts
in interfaceorg.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
-
-