Backend/e-suite.Database.Audit/e-suite.Database.Audit.UnitTests/Helpers/AuditEngineCoreTestBase.cs
2026-01-20 21:50:10 +00:00

26 lines
696 B
C#

using eSuite.Core.Clock;
using Moq;
using NUnit.Framework;
namespace e_suite.Database.Audit.UnitTests.Helpers;
public class AuditEngineCoreTestBase
{
protected TestDbContextFactory testDbContextFactory = null!;
protected Mock<IClock> _clockMock = null!;
public DateTimeOffset TestNow = DateTimeOffset.Now;
protected TestDbContext testDBContext = null!;
[SetUp]
public void Setup()
{
testDbContextFactory = new TestDbContextFactory();
_clockMock = new Mock<IClock>();
_clockMock.Setup(x => x.GetNow).Returns(() => TestNow);
testDBContext = testDbContextFactory.CreateContext(_clockMock.Object);
}
}