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 HotDeployerdeployerprotected RuntimeDeploymentdeploymentprotected RuntimeHarnessharnessprotected Map<Class<?>,ServiceProvider<?>>serviceProvidersProviders 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> voidaddServiceProvider(ServiceProvider<T> provider)voidbeforeRun(FeaturesRunner runner)Before running tests.protected voidblacklistComponents(FeaturesRunner aRunner)voidconfigure(FeaturesRunner runner, com.google.inject.Binder binder)Configures Guice bindings if any is required by the feature.RuntimeHarnessgetHarness()voidinitialize(FeaturesRunner runner)Called when preparing to run the test class.org.junit.rules.MethodRuleonMethodDeployment()HotDeployerregisterHandler(HotDeployer.ActionHandler handler)voidstart(FeaturesRunner runner)Features are initialized.voidstop(FeaturesRunner runner)Before exiting the test.booleanunregisterHandler(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.
-
-
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:RunnerFeatureCalled 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:
initializein 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:RunnerFeatureConfigures 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:
configurein interfaceRunnerFeature
-
start
public void start(FeaturesRunner runner) throws Exception
Description copied from interface:RunnerFeatureFeatures are initialized. Runner is ready to create the injector.- Specified by:
startin interfaceRunnerFeature- Throws:
Exception
-
stop
public void stop(FeaturesRunner runner) throws Exception
Description copied from interface:RunnerFeatureBefore exiting the test.- Specified by:
stopin 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:RunnerFeatureBefore running tests. At this point Guice modules are registered and injector created.- Specified by:
beforeRunin interfaceRunnerFeature- Throws:
Exception
-
-