Skip to content

Commit

Permalink
Adding support for min and max values for random number generation in…
Browse files Browse the repository at this point in the history
… testframework
  • Loading branch information
vinagesh committed Apr 29, 2020
1 parent a833bc0 commit 4ce52f4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sdk/core/Azure.Core/tests/TestFramework/TestRecording.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ public string GenerateId()
{
return Random.Next().ToString();
}

public string GenerateId(int maxValue)
{
return Random.Next(maxValue).ToString();
}

public string GenerateId(int minValue, int maxValue)
{
return Random.Next(minValue, maxValue).ToString();
}

public string GenerateAssetName(string prefix, [CallerMemberName]string callerMethodName = "testframework_failed")
{
Expand Down

0 comments on commit 4ce52f4

Please sign in to comment.