@Internal public class ConnectorTestingExtension extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
Extension
for supporting running of connector testing framework.
This extension is responsible for searching test resources annotated by TestEnv
,
ExternalSystem
and ExternalContextFactory
, storing them into storage provided by
JUnit, and manage lifecycle of these resources.
The extension uses ExtensionContext.Store
for handing over test resources to TestCaseInvocationContextProvider
, which will inject these resources into test cases as
parameters.
The order of initialization is promised to be:
TestEnv
, before all test cases in this extension
ExternalSystem
, before all test cases in this
extension
ExternalContextFactory
, before each test case in
TestCaseInvocationContextProvider
Modifier and Type | Field and Description |
---|---|
static String |
EXTERNAL_CONTEXT_FACTORIES_STORE_KEY |
static String |
EXTERNAL_SYSTEM_STORE_KEY |
static String |
TEST_ENV_STORE_KEY |
static org.junit.jupiter.api.extension.ExtensionContext.Namespace |
TEST_RESOURCE_NAMESPACE |
Constructor and Description |
---|
ConnectorTestingExtension() |
Modifier and Type | Method and Description |
---|---|
void |
afterAll(org.junit.jupiter.api.extension.ExtensionContext context) |
void |
beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) |
public static final org.junit.jupiter.api.extension.ExtensionContext.Namespace TEST_RESOURCE_NAMESPACE
public static final String TEST_ENV_STORE_KEY
public static final String EXTERNAL_SYSTEM_STORE_KEY
public static final String EXTERNAL_CONTEXT_FACTORIES_STORE_KEY
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.