#408 Репозиторий хранения данных WITS0 #7

Merged
on.nemtina merged 9 commits from WitsData into master 2024-12-12 16:11:56 +05:00
2 changed files with 4 additions and 32 deletions
Showing only changes of commit ad2c258f99 - Show all commits

View File

@ -33,7 +33,7 @@ namespace Persistence.IntegrationTests.Controllers
dbContext.CleanupDbSet<TechMessage>();
dbContext.CleanupDbSet<Database.Entity.DrillingSystem>();
var PaginationRequest = new PaginationRequest()
var requestDto = new PaginationRequest()
{
Skip = 1,
Take = 2,
@ -47,8 +47,8 @@ namespace Persistence.IntegrationTests.Controllers
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
Assert.NotNull(response.Content);
Assert.Empty(response.Content.Items);
Assert.Equal(PaginationRequest.Skip, response.Content.Skip);
Assert.Equal(PaginationRequest.Take, response.Content.Take);
Assert.Equal(requestDto.Skip, response.Content.Skip);
Assert.Equal(requestDto.Take, response.Content.Take);
}
[Fact]
@ -57,7 +57,7 @@ namespace Persistence.IntegrationTests.Controllers
//arrange
var dtos = await InsertRange();
var dtosCount = dtos.Count();
var PaginationRequest = new PaginationRequest()
var requestDto = new PaginationRequest()
{
Skip = 0,
Take = 2,

View File

@ -122,34 +122,6 @@ public class WitsDataService : IWitsDataService
result.Add(witsDataDto);
}
//foreach (var dto in dtos)
//{
// var witsDataDto = result
// .Where(e => e.DiscriminatorId == dto.DiscriminatorId)
// .Where(e => e.Timestamped == dto.Timestamp)
// .FirstOrDefault();
// if (witsDataDto == null)
// {
// witsDataDto = new WitsDataDto()
// {
// DiscriminatorId = dto.DiscriminatorId,
// Timestamped = dto.Timestamp
// };
// result.Add(witsDataDto);
// }
// var recordId = DecodeRecordId(dto.ParameterId);
// var itemId = DecodeItemId(dto.ParameterId);
// var witsValueDto = new WitsValueDto()
// {
// RecordId = recordId,
// ItemId = itemId,
// Value = ConvertValue(recordId, itemId, dto.Value)
// };
// witsDataDto.Values = witsDataDto.Values.Append(witsValueDto);
//}
return result;
}