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

namespace UserManager.UnitTests.Repository;

public class FakeDomainRepository : FakeRepository, IDomainRepository
{
    public List<Domain> Domains = [];

    public IQueryable<Domain> GetDomains()
    {
        return Domains.BuildMock();
    }

    public Task<Domain?> GetDomainById(IGeneralIdRef generalIdRef, CancellationToken cancellationToken)
    {
        return Task.FromResult(GetDomains().FindByGeneralIdRef(generalIdRef));
    }

    public Task<Domain?> GetDomainByName(string domainName, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task EditDomainAsync(AuditUserDetails auditUserDetails, Domain domain, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task CreateDomainAsync(AuditUserDetails auditUserDetails, Domain domain, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }

    public Task AddAdministratorRoleAsync(AuditUserDetails auditUserDetails, Domain domain, CancellationToken cancellationToken)
    {
        throw new NotImplementedException();
    }
}