forked from ddrilling/AsbCloudServer
#6539681 Удалил лишние референсы
This commit is contained in:
parent
6ab6da961a
commit
9644f73090
@ -157,5 +157,30 @@ namespace AsbCloudApp.Services
|
|||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<FileInfoDto> GetByMarkId(int idMark, CancellationToken token);
|
Task<FileInfoDto> GetByMarkId(int idMark, CancellationToken token);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// пометить метки файлов как удаленные
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idsMarks"></param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<int> MarkFileMarkAsDeletedAsync(IEnumerable<int> idsMarks, CancellationToken token);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Получение файлов по скважине
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idWell"></param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<IEnumerable<FileInfoDto>> GetInfosByWellIdAsync(int idWell, CancellationToken token);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Получить файлы определенной категории
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="idWell"></param>
|
||||||
|
/// <param name="idCategory"></param>
|
||||||
|
/// <param name="token"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<IEnumerable<FileInfoDto>> GetInfosByCategoryAsync(int idWell, int idCategory, CancellationToken token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,6 @@ namespace AsbCloudInfrastructure
|
|||||||
services.AddTransient<IDrillParamsService, DrillParamsService>();
|
services.AddTransient<IDrillParamsService, DrillParamsService>();
|
||||||
services.AddTransient<IEventService, EventService>();
|
services.AddTransient<IEventService, EventService>();
|
||||||
services.AddTransient<IFileService, FileService>();
|
services.AddTransient<IFileService, FileService>();
|
||||||
services.AddTransient<IFileRepository, FileRepository>();
|
|
||||||
services.AddTransient<IMeasureService, MeasureService>();
|
services.AddTransient<IMeasureService, MeasureService>();
|
||||||
services.AddTransient<IMessageService, MessageService>();
|
services.AddTransient<IMessageService, MessageService>();
|
||||||
services.AddTransient<IOperationsStatService, OperationsStatService>();
|
services.AddTransient<IOperationsStatService, OperationsStatService>();
|
||||||
@ -155,6 +154,7 @@ namespace AsbCloudInfrastructure
|
|||||||
dbSet => dbSet
|
dbSet => dbSet
|
||||||
.Include(c => c.Wells)
|
.Include(c => c.Wells)
|
||||||
.Include(c => c.Deposit))); // может быть включен в сервис ClusterService
|
.Include(c => c.Deposit))); // может быть включен в сервис ClusterService
|
||||||
|
services.AddTransient<IFileRepository, FileRepository>();
|
||||||
// Subsystem service
|
// Subsystem service
|
||||||
services.AddTransient<ICrudService<SubsystemDto>, CrudCacheServiceBase<SubsystemDto, Subsystem>>();
|
services.AddTransient<ICrudService<SubsystemDto>, CrudCacheServiceBase<SubsystemDto, Subsystem>>();
|
||||||
services.AddTransient<ISubsystemService, SubsystemService>();
|
services.AddTransient<ISubsystemService, SubsystemService>();
|
||||||
|
@ -23,7 +23,6 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
|||||||
private readonly IFileService fileService;
|
private readonly IFileService fileService;
|
||||||
private readonly IUserService userService;
|
private readonly IUserService userService;
|
||||||
private readonly IWellService wellService;
|
private readonly IWellService wellService;
|
||||||
private readonly IFileRepository fileRepository;
|
|
||||||
private readonly IConfiguration configuration;
|
private readonly IConfiguration configuration;
|
||||||
private readonly IBackgroundWorkerService backgroundWorker;
|
private readonly IBackgroundWorkerService backgroundWorker;
|
||||||
private readonly IEmailService emailService;
|
private readonly IEmailService emailService;
|
||||||
@ -54,7 +53,6 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
|||||||
IFileService fileService,
|
IFileService fileService,
|
||||||
IUserService userService,
|
IUserService userService,
|
||||||
IWellService wellService,
|
IWellService wellService,
|
||||||
IFileRepository fileRepository,
|
|
||||||
IConfiguration configuration,
|
IConfiguration configuration,
|
||||||
IBackgroundWorkerService backgroundWorker,
|
IBackgroundWorkerService backgroundWorker,
|
||||||
IEmailService emailService)
|
IEmailService emailService)
|
||||||
@ -63,7 +61,6 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
|||||||
this.fileService = fileService;
|
this.fileService = fileService;
|
||||||
this.userService = userService;
|
this.userService = userService;
|
||||||
this.wellService = wellService;
|
this.wellService = wellService;
|
||||||
this.fileRepository = fileRepository;
|
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
this.backgroundWorker = backgroundWorker;
|
this.backgroundWorker = backgroundWorker;
|
||||||
this.connectionString = configuration.GetConnectionString("DefaultConnection");
|
this.connectionString = configuration.GetConnectionString("DefaultConnection");
|
||||||
@ -312,9 +309,9 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
|||||||
.Select(m => m.Id);
|
.Select(m => m.Id);
|
||||||
|
|
||||||
if (oldMarksIds?.Any() == true)
|
if (oldMarksIds?.Any() == true)
|
||||||
await fileRepository.MarkFileMarkAsDeletedAsync(oldMarksIds, token);
|
await fileService.MarkFileMarkAsDeletedAsync(oldMarksIds, token);
|
||||||
|
|
||||||
var result = await fileRepository.CreateFileMarkAsync(fileMarkDto, idUser, token)
|
var result = await fileService.CreateFileMarkAsync(fileMarkDto, idUser, token)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
if (fileMarkDto.IdMarkType == idMarkTypeReject)
|
if (fileMarkDto.IdMarkType == idMarkTypeReject)
|
||||||
@ -344,7 +341,7 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
|||||||
public async Task<int> MarkAsDeletedFileMarkAsync(int idMark,
|
public async Task<int> MarkAsDeletedFileMarkAsync(int idMark,
|
||||||
CancellationToken token)
|
CancellationToken token)
|
||||||
{
|
{
|
||||||
var fileInfo = await fileRepository.GetByMarkId(idMark, token)
|
var fileInfo = await fileService.GetByMarkId(idMark, token)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
if (fileInfo.IdCategory < idFileCategoryDrillingProgramPartsStart ||
|
if (fileInfo.IdCategory < idFileCategoryDrillingProgramPartsStart ||
|
||||||
@ -483,6 +480,7 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
|||||||
.UseNpgsql(connectionString)
|
.UseNpgsql(connectionString)
|
||||||
.Options;
|
.Options;
|
||||||
using var context = new AsbCloudDbContext(contextOptions);
|
using var context = new AsbCloudDbContext(contextOptions);
|
||||||
|
var fileRepository = new FileRepository(context);
|
||||||
var fileService = new FileService(fileRepository);
|
var fileService = new FileService(fileRepository);
|
||||||
var files = state.Parts.Select(p => fileService.GetUrl(p.File));
|
var files = state.Parts.Select(p => fileService.GetUrl(p.File));
|
||||||
DrillingProgramMaker.UniteExcelFiles(files, tempResultFilePath, state.Parts, well);
|
DrillingProgramMaker.UniteExcelFiles(files, tempResultFilePath, state.Parts, well);
|
||||||
|
@ -183,5 +183,17 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
public async Task<FileInfoDto> GetByMarkId(int idMark, CancellationToken token)
|
public async Task<FileInfoDto> GetByMarkId(int idMark, CancellationToken token)
|
||||||
=> await fileRepository.GetByMarkId(idMark, token)
|
=> await fileRepository.GetByMarkId(idMark, token)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
public async Task<int> MarkFileMarkAsDeletedAsync(IEnumerable<int> idsMarks, CancellationToken token)
|
||||||
|
=> await fileRepository.MarkFileMarkAsDeletedAsync(idsMarks, token)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
public async Task<IEnumerable<FileInfoDto>> GetInfosByWellIdAsync(int idWell, CancellationToken token)
|
||||||
|
=> await fileRepository.GetInfosByWellIdAsync(idWell, token)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
public async Task<IEnumerable<FileInfoDto>> GetInfosByCategoryAsync(int idWell, int idCategory, CancellationToken token)
|
||||||
|
=> await fileRepository.GetInfosByCategoryAsync(idWell, idCategory, token)
|
||||||
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,17 +22,15 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
private readonly ITelemetryService telemetryService;
|
private readonly ITelemetryService telemetryService;
|
||||||
private readonly IWellService wellService;
|
private readonly IWellService wellService;
|
||||||
private readonly IBackgroundWorkerService backgroundWorkerService;
|
private readonly IBackgroundWorkerService backgroundWorkerService;
|
||||||
private readonly IFileRepository fileRepository;
|
|
||||||
|
|
||||||
public ReportService(IAsbCloudDbContext db, IConfiguration configuration,
|
public ReportService(IAsbCloudDbContext db, IConfiguration configuration,
|
||||||
ITelemetryService telemetryService, IWellService wellService, IBackgroundWorkerService backgroundWorkerService, IFileRepository fileRepository)
|
ITelemetryService telemetryService, IWellService wellService, IBackgroundWorkerService backgroundWorkerService)
|
||||||
{
|
{
|
||||||
this.db = db;
|
this.db = db;
|
||||||
this.connectionString = configuration.GetConnectionString("DefaultConnection");
|
this.connectionString = configuration.GetConnectionString("DefaultConnection");
|
||||||
this.wellService = wellService;
|
this.wellService = wellService;
|
||||||
this.backgroundWorkerService = backgroundWorkerService;
|
this.backgroundWorkerService = backgroundWorkerService;
|
||||||
this.telemetryService = telemetryService;
|
this.telemetryService = telemetryService;
|
||||||
this.fileRepository = fileRepository;
|
|
||||||
ReportCategoryId = db.FileCategories.AsNoTracking()
|
ReportCategoryId = db.FileCategories.AsNoTracking()
|
||||||
.FirstOrDefault(c =>
|
.FirstOrDefault(c =>
|
||||||
c.Name.Equals("Рапорт")).Id;
|
c.Name.Equals("Рапорт")).Id;
|
||||||
@ -68,6 +66,7 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
};
|
};
|
||||||
generator.Make(reportFileName);
|
generator.Make(reportFileName);
|
||||||
|
|
||||||
|
var fileRepository = new FileRepository(context);
|
||||||
var fileService = new FileService(fileRepository);
|
var fileService = new FileService(fileRepository);
|
||||||
var fileInfo = await fileService.MoveAsync(idWell, idUser, ReportCategoryId, reportFileName, reportFileName, token);
|
var fileInfo = await fileService.MoveAsync(idWell, idUser, ReportCategoryId, reportFileName, reportFileName, token);
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
private readonly IConfiguration configuration;
|
private readonly IConfiguration configuration;
|
||||||
private readonly IEmailService emailService;
|
private readonly IEmailService emailService;
|
||||||
private readonly IFileCategoryService fileCategoryService;
|
private readonly IFileCategoryService fileCategoryService;
|
||||||
private readonly IFileRepository fileRepository;
|
|
||||||
|
|
||||||
private const int FileServiceThrewException = -1;
|
private const int FileServiceThrewException = -1;
|
||||||
|
|
||||||
@ -38,8 +37,7 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
IWellService wellService,
|
IWellService wellService,
|
||||||
IConfiguration configuration,
|
IConfiguration configuration,
|
||||||
IEmailService emailService,
|
IEmailService emailService,
|
||||||
IFileCategoryService fileCategoryService,
|
IFileCategoryService fileCategoryService)
|
||||||
IFileRepository fileRepository)
|
|
||||||
{
|
{
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.fileService = fileService;
|
this.fileService = fileService;
|
||||||
@ -48,7 +46,6 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
this.emailService = emailService;
|
this.emailService = emailService;
|
||||||
this.fileCategoryService = fileCategoryService;
|
this.fileCategoryService = fileCategoryService;
|
||||||
this.fileRepository = fileRepository;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> UpdateRangeAsync(int idWell, IEnumerable<WellFinalDocumentInputDto>? dtos, CancellationToken token)
|
public async Task<int> UpdateRangeAsync(int idWell, IEnumerable<WellFinalDocumentInputDto>? dtos, CancellationToken token)
|
||||||
@ -98,7 +95,7 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
var categoriesIds = entitiesGroups
|
var categoriesIds = entitiesGroups
|
||||||
.Select(g => g.Key);
|
.Select(g => g.Key);
|
||||||
|
|
||||||
var files = (await fileRepository
|
var files = (await fileService
|
||||||
.GetInfosByWellIdAsync(idWell, token)
|
.GetInfosByWellIdAsync(idWell, token)
|
||||||
.ConfigureAwait(false))
|
.ConfigureAwait(false))
|
||||||
.Where(f => categoriesIds.Contains(f.IdCategory))
|
.Where(f => categoriesIds.Contains(f.IdCategory))
|
||||||
@ -165,7 +162,7 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
|
|
||||||
public async Task<WellFinalDocumentsHistoryDto> GetFilesHistoryByIdCategory(int idWell, int idCategory, CancellationToken token)
|
public async Task<WellFinalDocumentsHistoryDto> GetFilesHistoryByIdCategory(int idWell, int idCategory, CancellationToken token)
|
||||||
{
|
{
|
||||||
var files = await fileRepository.GetInfosByCategoryAsync(idWell, idCategory, token).ConfigureAwait(false);
|
var files = await fileService.GetInfosByCategoryAsync(idWell, idCategory, token).ConfigureAwait(false);
|
||||||
|
|
||||||
return new WellFinalDocumentsHistoryDto {
|
return new WellFinalDocumentsHistoryDto {
|
||||||
IdWell = idWell,
|
IdWell = idWell,
|
||||||
|
@ -81,7 +81,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
private readonly Mock<IFileService> fileServiceMock;
|
private readonly Mock<IFileService> fileServiceMock;
|
||||||
private readonly Mock<IUserService> userServiceMock;
|
private readonly Mock<IUserService> userServiceMock;
|
||||||
private readonly Mock<IWellService> wellServiceMock;
|
private readonly Mock<IWellService> wellServiceMock;
|
||||||
private readonly Mock<IFileRepository> fileRepository;
|
|
||||||
private readonly Mock<IConfiguration> configurationMock;
|
private readonly Mock<IConfiguration> configurationMock;
|
||||||
private readonly Mock<IBackgroundWorkerService> backgroundWorkerMock;
|
private readonly Mock<IBackgroundWorkerService> backgroundWorkerMock;
|
||||||
private readonly Mock<IEmailService> emailService;
|
private readonly Mock<IEmailService> emailService;
|
||||||
@ -101,7 +100,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock = new Mock<IFileService>();
|
fileServiceMock = new Mock<IFileService>();
|
||||||
userServiceMock = new Mock<IUserService>();
|
userServiceMock = new Mock<IUserService>();
|
||||||
wellServiceMock = new Mock<IWellService>();
|
wellServiceMock = new Mock<IWellService>();
|
||||||
fileRepository = new Mock<IFileRepository>();
|
|
||||||
configurationMock = new Mock<IConfiguration>();
|
configurationMock = new Mock<IConfiguration>();
|
||||||
backgroundWorkerMock = new Mock<IBackgroundWorkerService>();
|
backgroundWorkerMock = new Mock<IBackgroundWorkerService>();
|
||||||
}
|
}
|
||||||
@ -114,7 +112,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -132,7 +129,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -152,7 +148,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -176,7 +171,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -212,7 +206,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -239,7 +232,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -271,7 +263,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -310,7 +301,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -338,7 +328,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -366,7 +355,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
@ -397,7 +385,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
fileServiceMock.Object,
|
fileServiceMock.Object,
|
||||||
userServiceMock.Object,
|
userServiceMock.Object,
|
||||||
wellServiceMock.Object,
|
wellServiceMock.Object,
|
||||||
fileRepository.Object,
|
|
||||||
configurationMock.Object,
|
configurationMock.Object,
|
||||||
backgroundWorkerMock.Object,
|
backgroundWorkerMock.Object,
|
||||||
emailService.Object);
|
emailService.Object);
|
||||||
|
@ -23,7 +23,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
private readonly Mock<IConfiguration> configurationMock;
|
private readonly Mock<IConfiguration> configurationMock;
|
||||||
private readonly Mock<IEmailService> emailServiceMock;
|
private readonly Mock<IEmailService> emailServiceMock;
|
||||||
private readonly Mock<IFileCategoryService> fileCategoryService;
|
private readonly Mock<IFileCategoryService> fileCategoryService;
|
||||||
private readonly Mock<IFileRepository> fileRepository;
|
|
||||||
|
|
||||||
private readonly IEnumerable<UserDto> users = new List<UserDto> {
|
private readonly IEnumerable<UserDto> users = new List<UserDto> {
|
||||||
new UserDto {
|
new UserDto {
|
||||||
@ -53,7 +52,6 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
configurationMock = new Mock<IConfiguration>();
|
configurationMock = new Mock<IConfiguration>();
|
||||||
emailServiceMock = new Mock<IEmailService>();
|
emailServiceMock = new Mock<IEmailService>();
|
||||||
fileCategoryService = new Mock<IFileCategoryService>();
|
fileCategoryService = new Mock<IFileCategoryService>();
|
||||||
fileRepository = new Mock<IFileRepository>();
|
|
||||||
|
|
||||||
service = new WellFinalDocumentsService(
|
service = new WellFinalDocumentsService(
|
||||||
context: context,
|
context: context,
|
||||||
@ -62,8 +60,7 @@ namespace AsbCloudWebApi.Tests.ServicesTests
|
|||||||
wellService: wellServiceMock.Object,
|
wellService: wellServiceMock.Object,
|
||||||
configuration: configurationMock.Object,
|
configuration: configurationMock.Object,
|
||||||
emailService: emailServiceMock.Object,
|
emailService: emailServiceMock.Object,
|
||||||
fileCategoryService: fileCategoryService.Object,
|
fileCategoryService: fileCategoryService.Object);
|
||||||
fileRepository.Object);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~WellFinalDocumentsServiceTest()
|
~WellFinalDocumentsServiceTest()
|
||||||
|
Loading…
Reference in New Issue
Block a user