There is no default randomizer for type URI. Here is one prepared and can be included to objectfiller.
public class RandomUri : IRandomizerPlugin<Uri>
{
/// <summary>
/// Gets random data for type <see cref="Uri" />
/// </summary>
/// <returns>Random data for type <see cref="Uri" /></returns>
public Uri GetValue()
{
var http = Randomizer<bool>.Create() ? "http" : "https";
var www = Randomizer<bool>.Create() ? "www." : string.Empty;
var host = Randomizer<string>.Create(new MnemonicString(1)).ToLower();
var domain = Randomizer<string>.Create(new RandomListItem<string>("de", "com", "org", "uk", "gov", "fr", "ru"));
string relativePath = string.Empty;
if (Randomizer<bool>.Create())
{
var relativeElements =Randomizer<int>.Create(new IntRange(1, 4));
for (int i = 0; i < relativeElements; i++)
{
relativePath += $"/{Randomizer<string>.Create(new MnemonicString(1)).ToLower()}";
}
}
UriBuilder u = new UriBuilder(http, $"{www}{host}.{domain}{relativePath}");
return u.Uri;
}
}
There is no default randomizer for type URI. Here is one prepared and can be included to objectfiller.