IdentityShroud/IdentityShroud.Core.Tests/Substitutes/EncryptionServiceSubstitute.cs

18 lines
538 B
C#
Raw Normal View History

using IdentityShroud.Core.Contracts;
namespace IdentityShroud.Core.Tests.Substitutes;
public static class EncryptionServiceSubstitute
{
public static IEncryptionService CreatePassthrough()
{
var encryptionService = Substitute.For<IEncryptionService>();
encryptionService
.Encrypt(Arg.Any<byte[]>())
.Returns(x => x.ArgAt<byte[]>(0));
encryptionService
.Decrypt(Arg.Any<byte[]>())
.Returns(x => x.ArgAt<byte[]>(0));
return encryptionService;
}
}