mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 10:11:10 +00:00
Renames Model to Dto
This commit is contained in:
1 parent
76b9596a27
commit
3aa9702411
32 files changed
+179
-139
No files matched your search
+4
-4
@@ -1,6 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Bogus;
|
||||
using Lumina.Infrastructure.Common.Models.Configuration;
|
||||
using Lumina.Infrastructure.Common.Models.DTO.Configuration;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NSubstitute;
|
||||
using System;
|
||||
@@ -20,19 +20,19 @@ public class CryptographyServiceFixture
|
||||
/// Creates a valid encryption settings model for testing.
|
||||
/// </summary>
|
||||
/// <returns>The configured options.</returns>
|
||||
public static IOptions<EncryptionSettingsModel> CreateEncryptionSettings()
|
||||
public static IOptions<EncryptionSettingsDto> CreateEncryptionSettings()
|
||||
{
|
||||
// Generate a valid 256-bit (32 byte) key for AES-256
|
||||
byte[] key = new byte[32];
|
||||
RandomNumberGenerator.Fill(key);
|
||||
string base64Key = Convert.ToBase64String(key);
|
||||
|
||||
EncryptionSettingsModel settings = new()
|
||||
EncryptionSettingsDto settings = new()
|
||||
{
|
||||
SecretKey = base64Key
|
||||
};
|
||||
|
||||
IOptions<EncryptionSettingsModel> options = Substitute.For<IOptions<EncryptionSettingsModel>>();
|
||||
IOptions<EncryptionSettingsDto> options = Substitute.For<IOptions<EncryptionSettingsDto>>();
|
||||
options.Value.Returns(settings);
|
||||
|
||||
return options;
|
||||
|
||||
Reference in new issue
Block a user