Class UniqueRoot


  • @ProviderType
    public final class UniqueRoot
    extends org.apache.sling.testing.mock.sling.context.UniqueRoot
    Manages unique root paths in JCR repository. This is important for resource resolver types like JCR_JACKRABBIT where the repository is not cleaned for each test run. This class provides unique root paths for each run, and cleans them up when done.
    • Method Detail

      • dam

        public String dam()
        Gets (and creates if required) a unique path at /content/dam/xxx. The path (incl. all children) is automatically removed when the unit test completes.
        Returns:
        Unique content path
      • cleanUp

        protected void cleanUp()
        Overrides:
        cleanUp in class org.apache.sling.testing.mock.sling.context.UniqueRoot