using e_suite.API.Common;
using e_suite.Database.Audit;
using e_suite.Messaging.Common;
using e_suite.Modules.OrganisationManager.UnitTests.Repository;
using e_suite.UnitTestCore;
using Moq;

namespace e_suite.Modules.OrganisationManager.UnitTests.Helpers;

public class OrganisationManagerTestBase : TestBase
{
    protected FakeOrganisationManagerRepository FakeOrganisationManagerRepository = null!;
    protected AuditUserDetails AuditUserDetails = null!;
    protected Mock<IEFlowSyncMessageSender> EFlowSyncMessageSenderMock = null!;
    protected IOrganisationsManager OrganisationManager = null!;

    public override async Task Setup()
    {
        await base.Setup();

        AuditUserDetails = new AuditUserDetails
        {
            UserId = -1,
            UserDisplayName = "Testing User",
            Comment = "Test comment"
        };

        FakeOrganisationManagerRepository = new FakeOrganisationManagerRepository();
        EFlowSyncMessageSenderMock = new Mock<IEFlowSyncMessageSender>();
        OrganisationManager = new OrganisationsManager.OrganisationsManager(FakeOrganisationManagerRepository, EFlowSyncMessageSenderMock.Object);
    }
}