public interface TestContext extends PropertiesReader, PropertiesWriter
| Modifier and Type | Method and Description |
|---|---|
TestContext |
addError(Boolean condition,
String messageFormat,
Object... args)
Add an error message to the test context if the given condition is true.
|
TestContext |
addError(String messageFormat,
Object... args)
Add an error message to the test context.
|
TestContext |
addWarning(Boolean condition,
String messageFormat,
Object... args)
Add an warning message to the test context if the given condition is true.
|
TestContext |
addWarning(String messageFormat,
Object... args)
Add an warning message to the test context.
|
Collection<String> |
getErrors()
Get the error messages associated with the test context.
|
Collection<LocalResourceInfo> |
getLocalResources()
Get the local resource instances associated with the test.
|
String |
getMethodName()
Get the name of the test method associated with the test context.
|
MockProvider |
getMockProvider()
Get the mock provider associated with the test context.
|
String |
getName()
Get a unique name to identify the test context.
|
Collection<RemoteResourceInfo> |
getRemoteResources()
Get the remote resource instances associated with the test.
|
Optional<ServiceInstance> |
getServiceInstance()
Get the service instance associated with the test context.
|
Optional<SutDescriptor> |
getSutDescriptor()
Get the system under test descriptor.
|
<T> Optional<T> |
getSutInstance()
get the sut class instance.
|
Class<? extends Annotation> |
getTestCategory()
Get the test category associated with the test.
|
Class<?> |
getTestClass()
Get test class associated with the test context.
|
ClassLoader |
getTestClassLoader()
The class loader associated with the test class.
|
TestConfigurer |
getTestConfigurer()
Get the test configurer associated with the test context.
|
TestDescriptor |
getTestDescriptor()
Get the test class descriptor.
|
Object |
getTestInstance()
Get the test class instance.
|
MethodDescriptor |
getTestMethodDescriptor()
Get the test method descriptor associated with the test context.
|
String |
getTestName()
Get the simple name of the test class.
|
TestRunner |
getTestRunner()
Get the test runner associated with the test context.
|
Collection<VirtualResourceInfo> |
getVirtualResources()
Get the virtual resource instances associated with the test.
|
Collection<String> |
getWarnings()
Get the warning messages associated with the test context.
|
void |
verify()
Verify the integrity test context.
|
findCollection, findMap, findProperty, getPropertiesReader, getPropertyaddCollectionElement, addMapEntry, addProperty, computeIfAbsentgetProperties, isEmptyString getName()
String getTestName()
String getMethodName()
MethodDescriptor getTestMethodDescriptor()
Class<?> getTestClass()
ClassLoader getTestClassLoader()
TestDescriptor getTestDescriptor()
Optional<SutDescriptor> getSutDescriptor()
Object getTestInstance()
<T> Optional<T> getSutInstance()
T - sut instance typeTestRunner getTestRunner()
TestConfigurer getTestConfigurer()
MockProvider getMockProvider()
Optional<ServiceInstance> getServiceInstance()
Class<? extends Annotation> getTestCategory()
UnitCategory, IntegrationCategory, or SystemCategory.Collection<LocalResourceInfo> getLocalResources()
Collection<VirtualResourceInfo> getVirtualResources()
Collection<RemoteResourceInfo> getRemoteResources()
TestContext addError(String messageFormat, Object... args)
messageFormat - the message formatargs - message format argumentsTestContext addError(Boolean condition, String messageFormat, Object... args)
condition - the condition that will used to determine if the condition is addedmessageFormat - the message formatargs - message format argumentsCollection<String> getErrors()
TestContext addWarning(String messageFormat, Object... args)
messageFormat - the message formatargs - message format argumentsTestContext addWarning(Boolean condition, String messageFormat, Object... args)
condition - the condition that will used to determine if the condition is addedmessageFormat - the message formatargs - message format argumentsCollection<String> getWarnings()
void verify()
Copyright © 2016–2018 Testify Project. All rights reserved.