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);
    }
}