67 lines
2.5 KiB
C#
67 lines
2.5 KiB
C#
using e_suite.API.Common;
|
|
using e_suite.API.Common.repository;
|
|
using e_suite.Database.Audit;
|
|
using e_suite.Database.Core.Tables.Domain;
|
|
using e_suite.Messaging.Common;
|
|
using e_suite.UnitTestCore;
|
|
using eSuite.Core.Miscellaneous;
|
|
using Moq;
|
|
|
|
namespace e_suite.Modules.SpecificationManager.UnitTests.Helpers;
|
|
|
|
public class SpecificationManagerTestBase : TestBase
|
|
{
|
|
protected FakeSpecificationManagerRepository SpecificationManagerRepository { get; set; } = null!;
|
|
protected FakeGlossariesManagerRepository GlossariesManagerRepository { get; set; } = null!;
|
|
protected FakeFormRepository FormRepository { get; set; } = null!;
|
|
protected FakeSiteManagerRepository SiteManagerRepository { get; set; } = null!;
|
|
protected Mock<IEFlowSyncMessageSender> EFlowSyncMessageSenderMock { get; set; } = null!;
|
|
|
|
protected ISpecificationManager SpecificationManager { get; set; } = null!;
|
|
|
|
public override async Task Setup()
|
|
{
|
|
await base.Setup();
|
|
|
|
SpecificationManagerRepository = new FakeSpecificationManagerRepository();
|
|
GlossariesManagerRepository = new FakeGlossariesManagerRepository();
|
|
FormRepository = new FakeFormRepository();
|
|
EFlowSyncMessageSenderMock = new Mock<IEFlowSyncMessageSender>();
|
|
SiteManagerRepository = new FakeSiteManagerRepository();
|
|
|
|
SpecificationManager = new SpecificationManager(SpecificationManagerRepository, GlossariesManagerRepository, FormRepository, SiteManagerRepository, EFlowSyncMessageSenderMock.Object);
|
|
}
|
|
}
|
|
|
|
public class FakeDomainRepository : FakeRepository, IDomainRepository
|
|
{
|
|
public IQueryable<Domain> GetDomains()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<Domain?> GetDomainById(IGeneralIdRef generalIdRef, CancellationToken cancellationToken)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
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();
|
|
}
|
|
} |