Browse Source

fix(tests): fix unit tests

pull/1167/head
colin 12 months ago
parent
commit
6cbbc12d89
  1. 2
      aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/AbpDataProtectionTestDbContext.cs
  2. 2
      aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/EfCoreFakeProtectionObjectRepository.cs
  3. 19
      aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/FakeProtectionObjectAuth.cs

2
aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/AbpDataProtectionTestDbContext.cs

@ -18,5 +18,7 @@ public class AbpDataProtectionTestDbContext : AbpDataProtectionDbContext<AbpData
{
b.ConfigureByConvention();
});
modelBuilder.ConfigureEntityAuth<FakeProtectionObject, int, FakeProtectionObjectAuth>();
}
}

2
aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/EfCoreFakeProtectionObjectRepository.cs

@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.Abp.DataProtection
{
public class EfCoreFakeProtectionObjectRepository :
EfCoreDataProtectionRepository<AbpDataProtectionTestDbContext, FakeProtectionObject, int>,
EfCoreDataProtectionRepository<AbpDataProtectionTestDbContext, FakeProtectionObject, int, FakeProtectionObjectAuth>,
IFakeProtectionObjectRepository
{
public EfCoreFakeProtectionObjectRepository(

19
aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/FakeProtectionObjectAuth.cs

@ -0,0 +1,19 @@
using System;
namespace LINGYUN.Abp.DataProtection;
public class FakeProtectionObjectAuth : DataAuthBase<FakeProtectionObject, int>
{
public FakeProtectionObjectAuth()
{
}
public FakeProtectionObjectAuth(
int entityId,
string role,
string organizationUnit,
Guid? tenantId = null)
: base(entityId, role, organizationUnit, tenantId)
{
}
}
Loading…
Cancel
Save