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.SpecificationManager.UnitTests.Helpers;

public class FakeSiteManagerRepository : FakeRepository, ISiteManagerRepository
{
    public List<Site> Sites { get; set; } = [];

    public IQueryable<Site> GetSites()
    {
        return Sites.BuildMock();
    }

    public async Task<Site?> GetSite(IGeneralIdRef generalIdRef, CancellationToken cancellationToken)
    {
        return await GetSites().FindByGeneralIdRefAsync(generalIdRef, cancellationToken);
    }

    public Task EditSite(AuditUserDetails auditUserDetails, Site editedSite, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task CreateSite(AuditUserDetails auditUserDetails, Site newSite, CancellationToken cancellationToken)
    {
        Sites.Add(newSite);
        return Task.CompletedTask;
    }

    public Task CreateSite(AuditUserDetails auditUserDetails, IEnumerable<Site> newSites, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task<Site?> GetSite(long sigmaId, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }
}