ResourceNamer Class
- java.
lang. Object - com.
azure. core. test. utils. ResourceNamer
- com.
public class ResourceNamer
A random string generator used in tests.
Constructor Summary
Constructor | Description |
---|---|
ResourceNamer(String name) |
Creates a Resource |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
randomName(String prefix, int maxLen)
Gets a random name. |
String |
randomUuid()
Creates a random UUID. |
Methods inherited from java.lang.Object
Constructor Details
ResourceNamer
public ResourceNamer(String name)
Creates a ResourceNameGenerator that prefixes its strings with the name.
Parameters:
name
- The prefix for generated strings.
Method Details
randomName
public String randomName(String prefix, int maxLen)
Gets a random name.
Parameters:
prefix
- the prefix to be used if possible
maxLen
- the max length for the random generated name
Returns:
the random name
randomUuid
public String randomUuid()
Creates a random UUID.
Returns:
the UUID string.