From 3d89a924fd5fd52c258dbf17894260081751202f Mon Sep 17 00:00:00 2001 From: Jesper Justesen <1972142+FirestarJes@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:10:45 +0100 Subject: [PATCH] Update SettlementReportRequestHandlerIntegrationTests.cs --- ...entReportRequestHandlerIntegrationTests.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/source/settlement-report/SettlementReports.IntegrationTests/Application/SettlementReports/SettlementReportRequestHandlerIntegrationTests.cs b/source/settlement-report/SettlementReports.IntegrationTests/Application/SettlementReports/SettlementReportRequestHandlerIntegrationTests.cs index 4140c09..b18ff4a 100644 --- a/source/settlement-report/SettlementReports.IntegrationTests/Application/SettlementReports/SettlementReportRequestHandlerIntegrationTests.cs +++ b/source/settlement-report/SettlementReports.IntegrationTests/Application/SettlementReports/SettlementReportRequestHandlerIntegrationTests.cs @@ -17,6 +17,7 @@ using Energinet.DataHub.SettlementReport.Application.SettlementReports_v2; using Energinet.DataHub.SettlementReport.Interfaces.Models; using Energinet.DataHub.SettlementReport.Interfaces.SettlementReports_v2.Models; +using FluentAssertions.Extensions; using Moq; using Xunit; @@ -359,13 +360,13 @@ public async Task RequestReportAsync_ForWholesaleFixingWithBasisDataWithMonthlyA { "805", new CalculationId(Guid.Parse("45B9732A-49F8-450B-AA68-ED4661879D6F")) }, }; - var offset = TimeZoneInfo.FindSystemTimeZoneById("Romance Standard Time").GetUtcOffset(DateTime.UtcNow); - var startDate = new DateTimeOffset(2024, 1, 1, 1, 0, 0, offset).UtcDateTime; - var endDate = startDate.AddMonths(1); + var offsetStart = TimeZoneInfo.FindSystemTimeZoneById("Romance Standard Time").GetUtcOffset(new DateTime(2024, 5, 1, 0, 0, 0)); + var periodStart = new DateTimeOffset(2024, 5, 1, 0, 0, 0, offsetStart); + var periodEnd = periodStart.AddMonths(1); var filter = new SettlementReportRequestFilterDto( calculationFilter, - startDate, - endDate, + periodStart, + periodEnd, CalculationType.WholesaleFixing, null, null); @@ -634,11 +635,13 @@ public async Task RequestReportAsync_ForWholesaleFixingWithBasisDataWithSplitRes { "806", new CalculationId(Guid.Parse("45B9732A-49F8-450B-AA68-ED4661879D6F")) }, }; - var offset = TimeZoneInfo.FindSystemTimeZoneById("Romance Standard Time").GetUtcOffset(DateTime.UtcNow); + var offsetStart = TimeZoneInfo.FindSystemTimeZoneById("Romance Standard Time").GetUtcOffset(new DateTime(2024, 5, 1, 0, 0, 0)); + var periodStart = new DateTimeOffset(2024, 5, 1, 0, 0, 0, offsetStart); + var periodEnd = periodStart.AddMonths(1); var filter = new SettlementReportRequestFilterDto( calculationFilter, - new DateTimeOffset(2024, 1, 1, 1, 0, 0, offset).UtcDateTime, - new DateTimeOffset(2024, 1, 1, 1, 0, 0, offset).UtcDateTime.AddMonths(1), + periodStart.UtcDateTime, + periodEnd.UtcDateTime, CalculationType.WholesaleFixing, null, null);