Class OsgiConfigRestoreRule

java.lang.Object
org.junit.rules.ExternalResource
com.adobe.cq.testing.junit.rules.OsgiConfigRestoreRule
All Implemented Interfaces:
org.junit.rules.TestRule

public class OsgiConfigRestoreRule extends org.junit.rules.ExternalResource
Make a snapshot of the OSGi configuration of a given bundle and restore it to its original state after test execution.
  • Constructor Details

    • OsgiConfigRestoreRule

      public OsgiConfigRestoreRule(org.apache.sling.testing.junit.rules.instance.Instance quickstartRule, String pid)
  • Method Details

    • before

      protected void before() throws org.apache.sling.testing.clients.ClientException, org.apache.sling.testing.clients.util.config.InstanceConfigException, InterruptedException
      Overrides:
      before in class org.junit.rules.ExternalResource
      Throws:
      org.apache.sling.testing.clients.ClientException
      org.apache.sling.testing.clients.util.config.InstanceConfigException
      InterruptedException
    • after

      protected void after()
      Overrides:
      after in class org.junit.rules.ExternalResource