Class SlingInstancesRule
- java.lang.Object
-
- org.apache.sling.testing.serversetup.instance.SlingInstancesRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class SlingInstancesRule extends Object implements org.junit.rules.TestRule
JUnit Rule that executes tests for multiple Sling instances.
-
-
Constructor Summary
Constructors Constructor Description SlingInstancesRule(Iterable<SlingInstance> it)
SlingInstancesRule(String... instanceNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description dest)
Evaluate our base statement once for every instance.SlingInstance
getSlingInstance()
-
-
-
Constructor Detail
-
SlingInstancesRule
public SlingInstancesRule(String... instanceNames) throws org.apache.sling.testing.clients.ClientException
- Throws:
org.apache.sling.testing.clients.ClientException
-
SlingInstancesRule
public SlingInstancesRule(Iterable<SlingInstance> it)
-
-
Method Detail
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description dest)
Evaluate our base statement once for every instance. Tests can use our getSlingInstance() method to access the current one. See MultipleOsgiConsoleTest example in the samples integration tests module.- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
getSlingInstance
public SlingInstance getSlingInstance()
-
-