Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hassanhabib committed Sep 19, 2024
2 parents a6ea5fa + 229b2df commit 6a8fd1c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
// See License.txt in the project root for license information.
// ---------------------------------------------------------------

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
Expand Down Expand Up @@ -1224,11 +1226,21 @@ private static ValidationProblemDetails CreateRandomProblemDetails()
return randomValidationProblemDetails;
}

private static string[] GetRandomStringArray()
{
var filler = new Filler<string>();

return Enumerable.Range(0, new Random().Next(minValue: 1, maxValue: 10))
.Select(selector: _ => filler.Create())
.ToArray();
}

private static Dictionary<string, string[]> CreateRandomErrorDictionary()
{
var filler = new Filler<Dictionary<string, string[]>>();

filler.Setup()
.OnType<string[]>().Use(GetRandomStringArray())
.DictionaryItemCount(maxCount: 10);

return filler.Create();
Expand Down

0 comments on commit 6a8fd1c

Please sign in to comment.