Class 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 Detail

      • OsgiConfigRestoreRule

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

      • 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