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

## Class RunOnceRule

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

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

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

Allows wrapping a junit `TestRule` that will be run only once. Once means once per class RunOnceRule being loaded

### Constructor Summary

Constructors
`RunOnceRule​(T rule)` Constructor*

### 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`

### Constructor Detail

#### RunOnceRule

    public RunOnceRule​(T rule)

Constructor*

Type Parameters:
  `T` - The class of the TestRule
Parameters:
  `rule` - The rule to wrap and run once per classloader load

### 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`