public class TestResourceNamer extends ResourceNamer
TestMode.PLAYBACK, then names are fetched from
RecordedData. If the test mode is TestMode.RECORD, then the names are randomly generated and
persisted to RecordedData.| Constructor and Description |
|---|
TestResourceNamer(String name,
com.azure.core.test.TestMode testMode,
RecordedData recordedData)
Constructor of TestResourceNamer
|
| Modifier and Type | Method and Description |
|---|---|
OffsetDateTime |
now()
Gets an OffsetDateTime of UTC now.
|
String |
randomName(String prefix,
int maxLen)
Gets a random name.
|
String |
randomUuid()
Gets a random UUID.
|
public TestResourceNamer(String name, com.azure.core.test.TestMode testMode, RecordedData recordedData)
name - test name as prefixtestMode - the test mode TestMode.PLAYBACK or TestMode.RECORDrecordedData - the recorded data with list of network callpublic String randomName(String prefix, int maxLen)
randomName in class ResourceNamerprefix - the prefix to be used if possiblemaxLen - the max length for the random generated namepublic String randomUuid()
randomUuid in class ResourceNamerpublic OffsetDateTime now()
Copyright © 2019 Microsoft Corporation. All rights reserved.