using e_suite.API.Common;
using e_suite.Database.Audit;
using e_suite.Service.SigmaImporter.GmgProfiles;
using e_suite.Service.SigmaImporter.Helpers;
using e_suite.Service.SigmaImporter.Repository;
using e_suite.UnitTestCore;
using Microsoft.Extensions.Logging;
using Moq;

namespace SigmaImporter.UnitTests.Helpers;

public class GmgProfileImporterTestBaseWithoutMySql : TestBase
{
    protected Mock<ISigmaFileBrowserRepository> SigmaFileBrowserRepositoryMock { get; set; } = null!;
    protected Mock<IGlossariesManager> GlossariesManagerMock { get; set; }= null!;
    protected Mock<ICustomFieldManager> CustomFieldManagerMock { get; set; }= null!;
    protected Mock<ILogger> LoggerMock { get; set; } = null!;

    protected ImportGlossaryHelper ImportGlossaryHelper { get; set; } = null!;

    protected AuditUserDetails AuditUserDetails = new()
    {
        Comment = "SigmaImporter Automated import",
        UserDisplayName = "MessageProcessor"
    };

    public IGmgProfileImporter GmgProfileImporter { get; set; }= null!;

    public override async Task Setup()
    {
        await base.Setup();
        SigmaFileBrowserRepositoryMock = new Mock<ISigmaFileBrowserRepository>();
        GlossariesManagerMock = new Mock<IGlossariesManager>();
        LoggerMock = new Mock<ILogger>();

        ImportGlossaryHelper = new ImportGlossaryHelper(GlossariesManagerMock.Object);

        GmgProfileImporter = new e_suite.Service.SigmaImporter.GmgProfiles.GmgProfileImporter(SigmaFileBrowserRepositoryMock.Object, GlossariesManagerMock.Object, _configuration, LoggerMock.Object, ImportGlossaryHelper);
    }
}