T - the configuration typeR - the resource typeC - the client typepublic interface LocalResourceProvider<T,R,C>
| Modifier and Type | Method and Description |
|---|---|
T |
configure(TestContext testContext,
LocalResource localResource,
PropertiesReader configReader)
A method to configure a local resource.
|
default void |
load(TestContext testContext,
LocalResource localResource,
LocalResourceInstance<R,C> instance,
Set<String> dataFiles)
Load the given list of data file into the local resource prior to the resource being
used.
|
LocalResourceInstance<R,C> |
start(TestContext testContext,
LocalResource localResource,
T config)
Start the local resource with the given testContext and configuration.
|
void |
stop(TestContext testContext,
LocalResource localResource,
LocalResourceInstance<R,C> instance)
Stop the local resource.
|
T configure(TestContext testContext, LocalResource localResource, PropertiesReader configReader)
A method to configure a local resource. Configuring a local resource typically involves
creating a default configuration object that can be further configured by a
ConfigHandler method.
Note:
start(org.testifyproject.TestContext, org.testifyproject.annotation.LocalResource, java.lang.Object)
method.
.testify.yml configuration
properties. A specific section in .testify.yml can be specified through LocalResource.configKey().
ConfigHandler method before it is passed to
start(org.testifyproject.TestContext, org.testifyproject.annotation.LocalResource, java.lang.Object)
method
testContext - the test contextlocalResource - test class local resource annotationconfigReader - the value of configReaderLocalResourceInstance<R,C> start(TestContext testContext, LocalResource localResource, T config) throws Exception
testContext - the test contextlocalResource - test class local resource annotationconfig - the local resource configurationException - an exception thrown while startingdefault void load(TestContext testContext, LocalResource localResource, LocalResourceInstance<R,C> instance, Set<String> dataFiles) throws Exception
testContext - the test contextlocalResource - test class local resource annotationinstance - the local resource instancedataFiles - a data files that should be loadedException - an exception thrown while loading datavoid stop(TestContext testContext, LocalResource localResource, LocalResourceInstance<R,C> instance) throws Exception
testContext - the test contextlocalResource - test class local resource annotationinstance - the local resource instanceException - an exception thrown while stoppingCopyright © 2016–2018 Testify Project. All rights reserved.