Merge branch 'dev' into fix/import-comment-to-well-operations

This commit is contained in:
on.nemtina 2023-12-21 12:03:53 +05:00
commit f1c354c670
3 changed files with 12 additions and 1 deletions

View File

@ -420,6 +420,6 @@ public class DailyReportService : IDailyReportService
var from = DateOnly.FromDateTime(datesRange.From);
var to = DateOnly.FromDateTime(datesRange.To);
return from >= dateDailyReport && dateDailyReport <= to;
return dateDailyReport >= from && dateDailyReport <= to;
}
}

View File

@ -196,6 +196,11 @@ public class DailyReportServiceTest
KUsage = 30
};
private readonly SimpleTimezoneDto fakeWellTimezone = new()
{
Hours = 5,
};
private readonly IWellService wellServiceMock = Substitute.For<IWellService>();
private readonly ITrajectoryNnbRepository trajectoryFactNnbRepositoryMock = Substitute.For<ITrajectoryNnbRepository>();
private readonly IDailyReportRepository dailyReportRepositoryMock = Substitute.For<IDailyReportRepository>();
@ -281,6 +286,9 @@ public class DailyReportServiceTest
processMapReportWellDrillingServiceMock.GetAsync(Arg.Any<int>(), Arg.Any<CancellationToken>())
.ReturnsForAnyArgs(new[] { fakeProcessMapReportWellDrilling });
wellServiceMock.GetTimezone(Arg.Any<int>())
.ReturnsForAnyArgs(fakeWellTimezone);
}
[Fact]
@ -527,6 +535,9 @@ public class DailyReportServiceTest
yield return new object[]
{
new DateOnly(2090, 01, 01),
};
yield return new object[]
{
new DateOnly(2000, 01, 01)
};
}