public class ServicesRule extends Object implements org.junit.rules.MethodRule
rule which initializes Services environment.
The Services engine will be initialized with the specified configuration
file. All services will be started and the test class itself
will be registered for members injection.
In addition any field marked with Mock annotation will be initialized
with the mocked object. If also marked with Inject
then the mocked object will be registered as an instance binding in Guice injector.
Any method marked with Bindings annotation will executed with Binder
as a sole parameter to allow you to register additional Guice bindings.
| Constructor and Description |
|---|
ServicesRule()
Initializes
Services environment from "/test-config.xml" configuration file. |
ServicesRule(String config)
Initializes
Services environment from given configuration file. |
public ServicesRule()
Services environment from "/test-config.xml" configuration file.public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod method,
Object target)
apply in interface org.junit.rules.MethodRuleCopyright © 2012 Atteo. All Rights Reserved.