Skip to content

Commit

Permalink
feat: grid area ownership event handling
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmajgaard committed Dec 3, 2024
1 parent cd42a75 commit 7d294ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task<IEnumerable<GridAreaOwner>> GetGridAreaOwnersAsync(GridAreaCod
.OrderByDescending(gridAreaOwnerEntity => gridAreaOwnerEntity.ValidFrom)
.ThenByDescending(gridAreaOwnerEntity => gridAreaOwnerEntity.SequenceNumber)
.Where(gridAreaOwnerEntity =>
gridAreaOwnerEntity.ValidFrom >= from && gridAreaOwnerEntity.ValidFrom <= to &&
gridAreaOwnerEntity.ValidFrom >= from && gridAreaOwnerEntity.ValidFrom < to &&
gridAreaOwnerEntity.Code == gridAreaCode.Value)
.ToListAsync()
.ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public async Task Get_MultipleGridOwnersInPeriod_ReturnsAll()
var owners = (await target.GetGridAreaOwnersAsync(
new GridAreaCode(jan.GridAreaCode),
DateTimeOffset.Parse("2024-01-01").ToInstant(),
DateTimeOffset.Parse("2024-03-01").AddSeconds(-1).ToInstant()))
DateTimeOffset.Parse("2024-03-01").ToInstant()))
.OrderBy(x => x.ValidFrom).ToList();

// Assert
Expand Down

0 comments on commit 7d294ea

Please sign in to comment.