#region ========================================================================= USING =====================================================================================
using Bogus;
using Lumina.Presentation.Web.Common.DTO.Configuration;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#endregion
namespace Lumina.Presentation.Web.Fixtures.Common.DTO.Configuration;
///
/// Fixture class for the class.
///
[ExcludeFromCodeCoverage]
public class EncryptionSettingsDtoFixture
{
private readonly Faker _faker = new();
///
/// Creates a random valid .
///
/// Optional. The secret key used to encrypt data.
/// The created .
public EncryptionSettingsDto Create(
string? secretKey = null)
{
return new EncryptionSettingsDto
{
SecretKey = secretKey ?? _faker.Random.String2(44, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")
};
}
///
/// Creates a list of instances with randomized test data.
///
/// Number of instances to create.
/// List of configured instances.
public List CreateMany(int count = 3)
{
return [.. Enumerable.Range(0, count).Select(_ => Create())];
}
}