public abstract class TestBase extends Object
InterceptorManager.| Modifier and Type | Field and Description |
|---|---|
protected InterceptorManager |
interceptorManager |
protected TestResourceNamer |
testResourceNamer |
| Constructor and Description |
|---|
TestBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterTest()
Dispose of any resources and clean-up after a test case runs.
|
protected void |
beforeTest()
Performs any set-up before each test case.
|
TestMode |
getTestMode()
Gets the TestMode that has been initialized.
|
static void |
setupClass()
Before tests are executed, determines the test mode by reading the
TestBase.AZURE_TEST_MODE environment
variable. |
void |
setupTest()
Sets-up the
TestBase.testResourceNamer and TestBase.interceptorManager before each test case is run. |
void |
teardownTest()
Disposes of
InterceptorManager and its inheriting class' resources. |
protected abstract String |
testName()
Gets the name of the current test being run.
|
protected InterceptorManager interceptorManager
protected TestResourceNamer testResourceNamer
public static void setupClass()
TestBase.AZURE_TEST_MODE environment
variable. If it is not set, TestMode.PLAYBACKpublic void setupTest()
TestBase.testResourceNamer and TestBase.interceptorManager before each test case is run.
Then calls its implementing class to perform any other set-up commands.public void teardownTest()
InterceptorManager and its inheriting class' resources.public TestMode getTestMode()
protected abstract String testName()
NOTE: This could not be implemented in the base class using TestName because it always returns null. See https://stackoverflow.com/a/16113631/4220757.
protected void beforeTest()
protected void afterTest()
Copyright © 2019 Microsoft Corporation. All rights reserved.