From 6cbbc12d89fe60c88c1e9125056de414574c8fc5 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 9 Apr 2025 17:49:24 +0800 Subject: [PATCH] fix(tests): fix unit tests --- .../AbpDataProtectionTestDbContext.cs | 2 ++ .../EfCoreFakeProtectionObjectRepository.cs | 2 +- .../FakeProtectionObjectAuth.cs | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/FakeProtectionObjectAuth.cs diff --git a/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/AbpDataProtectionTestDbContext.cs b/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/AbpDataProtectionTestDbContext.cs index fd34f75d0..e0befea78 100644 --- a/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/AbpDataProtectionTestDbContext.cs +++ b/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/AbpDataProtectionTestDbContext.cs @@ -18,5 +18,7 @@ public class AbpDataProtectionTestDbContext : AbpDataProtectionDbContext(); } } diff --git a/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/EfCoreFakeProtectionObjectRepository.cs b/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/EfCoreFakeProtectionObjectRepository.cs index 8f3b94c54..b43cd1648 100644 --- a/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/EfCoreFakeProtectionObjectRepository.cs +++ b/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, + EfCoreDataProtectionRepository, IFakeProtectionObjectRepository { public EfCoreFakeProtectionObjectRepository( diff --git a/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/FakeProtectionObjectAuth.cs b/aspnet-core/tests/LINGYUN.Abp.DataProtection.Tests/LINGYUN/Abp/DataProtection/FakeProtectionObjectAuth.cs new file mode 100644 index 000000000..76b2f72c1 --- /dev/null +++ b/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 +{ + public FakeProtectionObjectAuth() + { + } + + public FakeProtectionObjectAuth( + int entityId, + string role, + string organizationUnit, + Guid? tenantId = null) + : base(entityId, role, organizationUnit, tenantId) + { + } +}