From 237290a301a91daac7f89a637b60d09f3572e4bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Mon, 30 Mar 2020 00:12:48 +0300 Subject: [PATCH] Update AuditLogRepository_Tests.cs --- .../AuditLogging/AuditLogRepository_Tests.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs index 3b04b78234..7acf357e3b 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs @@ -431,13 +431,13 @@ namespace Volo.Abp.AuditLogging await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)); //Assert - var logs = await AuditLogRepository.GetEntityChangeListAsync(); - logs.ShouldNotBeNull(); - logs.Count.ShouldBe(3); + var entityChanges = await AuditLogRepository.GetEntityChangeListAsync(); + entityChanges.ShouldNotBeNull(); + entityChanges.Count.ShouldBe(3); - logs.Single(x => x.ChangeType == EntityChangeType.Created).ShouldNotBeNull(); - logs.Single(x => x.ChangeType == EntityChangeType.Deleted).ShouldNotBeNull(); - logs.Single(x => x.ChangeType == EntityChangeType.Updated).ShouldNotBeNull(); + entityChanges.Single(x => x.ChangeType == EntityChangeType.Created).ShouldNotBeNull(); + entityChanges.Single(x => x.ChangeType == EntityChangeType.Deleted).ShouldNotBeNull(); + entityChanges.Single(x => x.ChangeType == EntityChangeType.Updated).ShouldNotBeNull(); } [Fact] @@ -541,17 +541,17 @@ namespace Volo.Abp.AuditLogging await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)); //Assert - var logs = await AuditLogRepository.GetEntityChangeListAsync(); - logs.ShouldNotBeNull(); - logs.Count.ShouldBe(3); + var entityChangesDesc = await AuditLogRepository.GetEntityChangeListAsync(); + entityChangesDesc.ShouldNotBeNull(); + entityChangesDesc.Count.ShouldBe(3); - logs.First().EntityTypeFullName.ShouldBe("Volo.Abp.AuditLogging.TestEntity_Updated"); - logs.Last().EntityTypeFullName.ShouldBe("Volo.Abp.AuditLogging.TestEntity_Deleted"); + entityChangesDesc.First().EntityTypeFullName.ShouldBe("Volo.Abp.AuditLogging.TestEntity_Updated"); + entityChangesDesc.Last().EntityTypeFullName.ShouldBe("Volo.Abp.AuditLogging.TestEntity_Deleted"); - var logsReversed = await AuditLogRepository.GetEntityChangeListAsync("changeTime asc"); + var entityChangesAsc = await AuditLogRepository.GetEntityChangeListAsync("changeTime asc"); - logsReversed.First().EntityTypeFullName.ShouldBe("Volo.Abp.AuditLogging.TestEntity_Deleted"); - logsReversed.Last().EntityTypeFullName.ShouldBe("Volo.Abp.AuditLogging.TestEntity_Updated"); + entityChangesAsc.First().EntityTypeFullName.ShouldBe("Volo.Abp.AuditLogging.TestEntity_Deleted"); + entityChangesAsc.Last().EntityTypeFullName.ShouldBe("Volo.Abp.AuditLogging.TestEntity_Updated"); } [Fact] @@ -654,9 +654,9 @@ namespace Volo.Abp.AuditLogging await AuditLogRepository.InsertAsync(new AuditLog(GuidGenerator, log2)); //Assert - var logs = await AuditLogRepository.GetEntityChangeListAsync(changeType: EntityChangeType.Created); - logs.ShouldNotBeNull(); - logs.Count.ShouldBe(1); + var entityChanges = await AuditLogRepository.GetEntityChangeListAsync(changeType: EntityChangeType.Created); + entityChanges.ShouldNotBeNull(); + entityChanges.Count.ShouldBe(1); } } }