Package org.apache.sling.testing.junit.rules

## Class SlingRule

- java.lang.Object
- - org.apache.sling.testing.junit.rules.SlingRule

All Implemented Interfaces:
  `org.junit.rules.TestRule`

    public class SlingRule
    extends Object
    implements org.junit.rules.TestRule

Sling Rule that wraps all the Rules (at method level) useful when running a Sling Integration Test. Can be used in any junit test using the @Rule annotation It chains: `TestTimeout`, `TestDescriptionRule`, `TestStickyCookieRule`, `FilterRule`

### Field Summary

Fields
`FilterRule` `filterRule` Rule to filter tests per method name
`protected org.junit.rules.RuleChain` `ruleChain` Main RuleChain describing the order of execution of all the rules
`TestDescriptionRule` `testDescriptionRule` Rule to send in every request a header with the test name
`TestStickyCookieRule` `testStickySessionRule` Rule to add a Sticky Session Cookie for requests
`TestTimeout` `testTimeoutRule` Rule to define the max timeout for all the tests

### Constructor Summary

Constructors
`SlingRule​(Instance... instances)`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.junit.runners.model.Statement` `apply​(org.junit.runners.model.Statement base, org.junit.runner.Description description)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### testTimeoutRule

    public final TestTimeout testTimeoutRule

Rule to define the max timeout for all the tests

#### testStickySessionRule

    public final TestStickyCookieRule testStickySessionRule

Rule to add a Sticky Session Cookie for requests

#### filterRule

    public final FilterRule filterRule

Rule to filter tests per method name

#### testDescriptionRule

    public final TestDescriptionRule testDescriptionRule

Rule to send in every request a header with the test name

#### ruleChain

    protected org.junit.rules.RuleChain ruleChain

Main RuleChain describing the order of execution of all the rules

### Constructor Detail

#### SlingRule

    public SlingRule​(Instance... instances)

### Method Detail

#### apply

    public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                   org.junit.runner.Description description)

Specified by:
  `apply` in interface `org.junit.rules.TestRule`