Package io.wcm.testing.mock.aem.context
Class UniqueRoot
java.lang.Object
org.apache.sling.testing.mock.sling.context.UniqueRoot
io.wcm.testing.mock.aem.context.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.
-
Field Summary
Fields inherited from class org.apache.sling.testing.mock.sling.context.UniqueRoot
uniquePathPart -
Method Summary
Methods inherited from class org.apache.sling.testing.mock.sling.context.UniqueRoot
apps, content, deleteResources, getOrCreateResource, libs
-
Method Details
-
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:
cleanUpin classorg.apache.sling.testing.mock.sling.context.UniqueRoot
-