org.apache.sling.testing.tools.sling
Class SlingInstancesRule

java.lang.Object
  extended by org.apache.sling.testing.tools.sling.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
SlingInstancesRule(Iterable<SlingInstance> it)
           
SlingInstancesRule(String... instanceNames)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlingInstancesRule

public SlingInstancesRule(String... instanceNames)

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 interface org.junit.rules.TestRule

getSlingInstance

public SlingInstance getSlingInstance()


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.