Skip to content

Commit d36d97d

Browse files
committed
Refactor unit tests.
1 parent 2dccdfd commit d36d97d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/TestBase/Tests/Abp.TestBase.SampleApplication.Tests/Auditing/AuditedEntity_Tests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public AuditedEntity_Tests()
1818
[Fact]
1919
public void Should_Write_Audit_Properties()
2020
{
21-
Clock.Provider = new UtcClockProvider();
22-
2321
//Arrange
2422
AbpSession.TenantId = 1;
2523
AbpSession.UserId = 2;

src/TestBase/Tests/Abp.TestBase.SampleApplication.Tests/EntityFramework/ObjectMaterialize_Tests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public ObjectMaterialize_Tests()
3535
[Fact]
3636
public void DateTime_Kind_Propert_Should_Be_Normalized_On_Ef_ObjectMaterialition()
3737
{
38-
using (_unitOfWorkManager.Begin())
38+
using (var uow = _unitOfWorkManager.Begin())
3939
{
4040
var companies = _companyRepository.GetAll().Include(c => c.Branches).ToList();
4141

@@ -54,8 +54,9 @@ public void DateTime_Kind_Propert_Should_Be_Normalized_On_Ef_ObjectMaterialition
5454
branch.CreationTime.Kind.ShouldBe(Clock.Kind);
5555
});
5656
}
57+
58+
uow.Complete();
5759
}
5860
}
59-
6061
}
6162
}

0 commit comments

Comments
 (0)