Pass Span instead of Memory
This commit is contained in:
parent
650fe99990
commit
ccc00d8e80
10 changed files with 45 additions and 38 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using IdentityShroud.Core.Contracts;
|
||||
using IdentityShroud.Core.Model;
|
||||
using IdentityShroud.Core.Security;
|
||||
using IdentityShroud.Core.Services;
|
||||
using IdentityShroud.Core.Tests.Fixtures;
|
||||
using IdentityShroud.TestUtils.Substitutes;
|
||||
|
|
@ -11,17 +10,13 @@ namespace IdentityShroud.Core.Tests.Services;
|
|||
public class ClientServiceTests : IClassFixture<DbFixture>
|
||||
{
|
||||
private readonly DbFixture _dbFixture;
|
||||
//private readonly IDekEncryptionService _dekEncryptionService = EncryptionServiceSubstitute.CreatePassthrough();
|
||||
private readonly IDataEncryptionService _dataEncryptionService = Substitute.For<IDataEncryptionService>();
|
||||
private readonly NullDataEncryptionService _dataEncryptionService = new();
|
||||
|
||||
private readonly IClock _clock = Substitute.For<IClock>();
|
||||
private readonly Guid _realmId = new("a1b2c3d4-0000-0000-0000-000000000001");
|
||||
|
||||
public ClientServiceTests(DbFixture dbFixture)
|
||||
{
|
||||
_dataEncryptionService.Encrypt(Arg.Any<ReadOnlyMemory<byte>>())
|
||||
.Returns(x => new EncryptedValue(DekId.NewId(), x.ArgAt<ReadOnlyMemory<byte>>(0).ToArray()));
|
||||
|
||||
_dbFixture = dbFixture;
|
||||
using Db db = dbFixture.CreateDbContext();
|
||||
if (!db.Database.EnsureCreated())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue