Package org.nuxeo.runtime.test.runner
Class RuntimeFeature
- java.lang.Object
-
- org.nuxeo.runtime.test.runner.RuntimeFeature
-
- All Implemented Interfaces:
RunnerFeature
public class RuntimeFeature extends Object implements RunnerFeature
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected HotDeployer
deployer
protected RuntimeDeployment
deployment
protected RuntimeHarness
harness
protected Map<Class<?>,ServiceProvider<?>>
serviceProviders
Providers contributed by other features to override the default service provider used for a nuxeo service.
-
Constructor Summary
Constructors Constructor Description RuntimeFeature()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
addServiceProvider(ServiceProvider<T> provider)
void
beforeRun(FeaturesRunner runner)
Before running tests.protected void
blacklistComponents(FeaturesRunner aRunner)
void
configure(FeaturesRunner runner, com.google.inject.Binder binder)
Configures Guice bindings if any is required by the feature.RuntimeHarness
getHarness()
void
initialize(FeaturesRunner runner)
Called when preparing to run the test class.org.junit.rules.MethodRule
onMethodDeployment()
HotDeployer
registerHandler(HotDeployer.ActionHandler handler)
void
start(FeaturesRunner runner)
Features are initialized.void
stop(FeaturesRunner runner)
Before exiting the test.boolean
unregisterHandler(HotDeployer.ActionHandler handler)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.test.runner.RunnerFeature
afterMethodRun, afterRun, afterTeardown, afterTeardown, beforeMethodRun, beforeSetup, beforeSetup, testCreated
-
-
-
-
Field Detail
-
harness
protected RuntimeHarness harness
-
deployment
protected RuntimeDeployment deployment
-
deployer
protected HotDeployer deployer
-
serviceProviders
protected final Map<Class<?>,ServiceProvider<?>> serviceProviders
Providers contributed by other features to override the default service provider used for a nuxeo service.
-
-
Constructor Detail
-
RuntimeFeature
public RuntimeFeature()
-
-
Method Detail
-
addServiceProvider
public <T> void addServiceProvider(ServiceProvider<T> provider)
-
getHarness
public RuntimeHarness getHarness()
-
initialize
public void initialize(FeaturesRunner runner) throws Exception
Description copied from interface:RunnerFeature
Called when preparing to run the test class. Framework is not started at this point. Here is time for the feature to configure the runner from annotations on the test class.- Specified by:
initialize
in interfaceRunnerFeature
- Throws:
Exception
-
registerHandler
public HotDeployer registerHandler(HotDeployer.ActionHandler handler)
-
unregisterHandler
public boolean unregisterHandler(HotDeployer.ActionHandler handler)
-
configure
public void configure(FeaturesRunner runner, com.google.inject.Binder binder)
Description copied from interface:RunnerFeature
Configures Guice bindings if any is required by the feature. This is called after the framework is started and before Guice module is built. The tests are launched after guice module is built.- Specified by:
configure
in interfaceRunnerFeature
-
start
public void start(FeaturesRunner runner) throws Exception
Description copied from interface:RunnerFeature
Features are initialized. Runner is ready to create the injector.- Specified by:
start
in interfaceRunnerFeature
- Throws:
Exception
-
stop
public void stop(FeaturesRunner runner) throws Exception
Description copied from interface:RunnerFeature
Before exiting the test.- Specified by:
stop
in interfaceRunnerFeature
- Throws:
Exception
-
onMethodDeployment
public org.junit.rules.MethodRule onMethodDeployment()
-
blacklistComponents
protected void blacklistComponents(FeaturesRunner aRunner)
-
beforeRun
public void beforeRun(FeaturesRunner runner) throws Exception
Description copied from interface:RunnerFeature
Before running tests. At this point Guice modules are registered and injector created.- Specified by:
beforeRun
in interfaceRunnerFeature
- Throws:
Exception
-
-