Class UniquePaths
- java.lang.Object
-
- org.apache.sling.testing.clients.util.UniquePaths
-
public class UniquePaths extends Object
Generate unique paths, for tests isolation
-
-
Constructor Summary
Constructors Constructor Description UniquePaths()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
get(Object nameReference)
Get a unique ID with no base pathstatic String
get(Object nameReference, String basePath)
Return a unique path based on basePath
-
-
-
Field Detail
-
SEP
public static final String SEP
- See Also:
- Constant Field Values
-
U_PATTERN
public static final String U_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static String get(Object nameReference, String basePath)
Return a unique path based on basePath- Parameters:
nameReference
- The simple class name of that object is used as part of the generated unique IDbasePath
- All occurrences ofU_PATTERN
in basePath are replaced by the generated unique ID. If $U$ is not found in basePath, unique ID is added at its end.- Returns:
- path with a unique value for each call.
-
-