#408 Репозиторий хранения данных WITS0 #7
@ -33,7 +33,7 @@ namespace Persistence.IntegrationTests.Controllers
|
|||||||
dbContext.CleanupDbSet<TechMessage>();
|
dbContext.CleanupDbSet<TechMessage>();
|
||||||
dbContext.CleanupDbSet<Database.Entity.DrillingSystem>();
|
dbContext.CleanupDbSet<Database.Entity.DrillingSystem>();
|
||||||
|
|
||||||
var PaginationRequest = new PaginationRequest()
|
var requestDto = new PaginationRequest()
|
||||||
{
|
{
|
||||||
Skip = 1,
|
Skip = 1,
|
||||||
Take = 2,
|
Take = 2,
|
||||||
@ -47,8 +47,8 @@ namespace Persistence.IntegrationTests.Controllers
|
|||||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||||
Assert.NotNull(response.Content);
|
Assert.NotNull(response.Content);
|
||||||
Assert.Empty(response.Content.Items);
|
Assert.Empty(response.Content.Items);
|
||||||
Assert.Equal(PaginationRequest.Skip, response.Content.Skip);
|
Assert.Equal(requestDto.Skip, response.Content.Skip);
|
||||||
Assert.Equal(PaginationRequest.Take, response.Content.Take);
|
Assert.Equal(requestDto.Take, response.Content.Take);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@ -57,7 +57,7 @@ namespace Persistence.IntegrationTests.Controllers
|
|||||||
//arrange
|
//arrange
|
||||||
var dtos = await InsertRange();
|
var dtos = await InsertRange();
|
||||||
var dtosCount = dtos.Count();
|
var dtosCount = dtos.Count();
|
||||||
var PaginationRequest = new PaginationRequest()
|
var requestDto = new PaginationRequest()
|
||||||
{
|
{
|
||||||
Skip = 0,
|
Skip = 0,
|
||||||
Take = 2,
|
Take = 2,
|
||||||
|
@ -122,34 +122,6 @@ public class WitsDataService : IWitsDataService
|
|||||||
result.Add(witsDataDto);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user