using e_suite.API.Common;
using e_suite.UnitTestCore;
using GlossariesManager.UnitTests.Repository;
using Moq;

namespace GlossariesManager.UnitTests.Helpers;

public class GlossariesManagerTestBase : TestBase
{
    protected IGlossariesManager GlossariesManager = null!;
    protected FakeGlossariesManagerRepository GlossariesManagerRepository { get; set; } = null!;

    protected Mock<ICustomFieldValidator> CustomFieldValidatorMock = null!;

    protected Mock<ICustomFieldHelper> CustomFieldHelperMock = null!;

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

        GlossariesManagerRepository = new FakeGlossariesManagerRepository();

        CustomFieldValidatorMock = new Mock<ICustomFieldValidator>();
        CustomFieldHelperMock = new Mock<ICustomFieldHelper>();

        GlossariesManager = new e_suite.Modules.GlossariesManager.GlossariesManager(GlossariesManagerRepository, CustomFieldValidatorMock.Object, CustomFieldHelperMock.Object);
    }
}