1
0

Solution restructured to use multiple test projects

This commit is contained in:
2024-07-04 18:22:26 +02:00
parent 508379d704
commit df6763b99b
144 changed files with 387 additions and 1693 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Security.Cryptography;
using ReflectionMagic;
namespace AMWD.Common.Tests.Utils
{
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal class CryptographyHelperSaltMock : IDisposable
{
private readonly int _saltLength;
private CryptographyHelperSaltMock(int saltLength)
{
_saltLength = typeof(CryptographyHelper).AsDynamicType()._saltLength;
SetSaltLength(saltLength);
}
public static IDisposable Create(int saltLength)
=> new CryptographyHelperSaltMock(saltLength);
public void Dispose()
=> SetSaltLength(_saltLength);
private static void SetSaltLength(int length)
=> typeof(CryptographyHelper).AsDynamicType()._saltLength = length;
}
}