Class ServerDependencyRule
java.lang.Object
com.xebialabs.restito.support.junit.ServerDependencyRule
- All Implemented Interfaces:
org.junit.rules.TestRule
This rule can be used together with
NeedsServer
annotation. It allows to start/stop server from base test case reducing boilerplate in your test classes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement base, org.junit.runner.Description description) boolean
Returns true when current test case is marked withNeedsServer
and thus needs the server to be started.
-
Constructor Details
-
ServerDependencyRule
public ServerDependencyRule()
-
-
Method Details
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description) - Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
isServerDependent
public boolean isServerDependent()Returns true when current test case is marked withNeedsServer
and thus needs the server to be started.
-