Внести правки по результатам ревью #2
This commit is contained in:
parent
c496cea07a
commit
4fa00de88e
@ -49,7 +49,7 @@ namespace Persistence.IntegrationTests.Controllers
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
Assert.NotNull(response.Content);
|
||||
Assert.NotEmpty(response.Content);
|
||||
Assert.Equal(response.Content.FirstOrDefault()?.Key, setpointKey);
|
||||
Assert.Equal(setpointKey, response.Content.FirstOrDefault()?.Key);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@ -87,7 +87,7 @@ namespace Persistence.IntegrationTests.Controllers
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
Assert.NotNull(response.Content);
|
||||
Assert.NotEmpty(response.Content);
|
||||
Assert.Equal(response.Content.FirstOrDefault()?.Key, setpointKey);
|
||||
Assert.Equal(setpointKey, response.Content.FirstOrDefault()?.Key);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@ -122,7 +122,7 @@ namespace Persistence.IntegrationTests.Controllers
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
Assert.NotNull(response.Content);
|
||||
Assert.NotEmpty(response.Content);
|
||||
Assert.Equal(response.Content.FirstOrDefault().Value.FirstOrDefault()?.Key, setpointKey);
|
||||
Assert.Equal(setpointKey, response.Content.FirstOrDefault()?.Key);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -35,6 +35,7 @@ namespace Persistence.Repository.Repositories
|
||||
.ToArrayAsync(token);
|
||||
var filteredEntities = entities
|
||||
.GroupBy(e => e.Key)
|
||||
.Select(e => e.OrderBy(o => o.Created))
|
||||
.Select(e => e.Where(e => e.Created <= historyMoment).Last());
|
||||
var dtos = filteredEntities
|
||||
.Select(e => e.Adapt<SetpointValueDto>());
|
||||
|
Loading…
Reference in New Issue
Block a user