using e_suite.API.Common.repository;
using e_suite.Database.Audit;
using e_suite.Database.Core.Extensions;
using e_suite.Database.Core.Tables.Printer;
using e_suite.UnitTestCore;
using eSuite.Core.Miscellaneous;
using MockQueryable;

namespace e_suite.Modules.SiteManager.UnitTests.Helpers;

public class FakeOrganisationManagerRepository : FakeRepository, IOrganisationsManagerRepository
{
    public List<Organisation> Organisations { get; set; } = [];

    public IQueryable<Organisation> GetOrganisationsList()
    {
        return Organisations.BuildMock();
    }
    
    public Task AddOrganisation(AuditUserDetails auditUserDetails, Organisation organisation, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task DeleteOrganisation(
        AuditUserDetails auditUserDetails,
        IGeneralIdRef generalIdRef,
        CancellationToken cancellationToken
    )
    {
        throw new NotImplementedException();
    }

    public Task EditOrganisation(
        AuditUserDetails auditUserDetails,
        Organisation organisation,
        CancellationToken cancellationToken
    )
    {
        throw new NotImplementedException();
    }

    public async Task<Organisation?> FindOrganisation(IGeneralIdRef generalIdRef, CancellationToken cancellationToken)
    {
        return await GetOrganisationsList().FindByGeneralIdRefAsync(generalIdRef, cancellationToken);
    }
}