feat(aihitMainSyncer): Добавлен Replacement входных данных

This commit is contained in:
Mikhail Kuznetsov
2025-11-27 17:11:14 +10:00
parent f42e5b5ea8
commit 5f84ccf4b8
5 changed files with 86 additions and 12 deletions

View File

@@ -393,8 +393,8 @@ namespace PARR.DAL.Tests.TransformServices
{
// Arrange
var pastDate = new DateTimeOffset(2025, 11, 20, 10, 0, 0, TimeSpan.Zero); // Прошлое время
var futureNonMatchingDate = new DateTimeOffset(2025, 11, 27, 10, 0, 0, TimeSpan.Zero); // Будущее время
var matchingDate = new DateTimeOffset(2025, 11, 26, 10, 0, 0, TimeSpan.Zero); // Совпадает время
var futureDate = new DateTimeOffset(2025, 11, 30, 10, 0, 0, TimeSpan.Zero); // Будущее время
var matchingDate = new DateTimeOffset(2025, 11, 27, 10, 0, 0, TimeSpan.Zero); // Совпадает время
var scheduleDto = new EsppScheduleDto
{
@@ -434,13 +434,13 @@ namespace PARR.DAL.Tests.TransformServices
// Act
var resultFromPast = await service.GetNextDateAsync(Guid.NewGuid(), pastDate);
var resultFromFutureNonMatching = await service.GetNextDateAsync(Guid.NewGuid(), futureNonMatchingDate);
var resultFromFutureMatching = await service.GetNextDateAsync(Guid.NewGuid(), matchingDate);
var resultFromFutureMatching = await service.GetNextDateAsync(Guid.NewGuid(), futureDate);
var resultFromSimpleMatching = await service.GetNextDateAsync(Guid.NewGuid(), matchingDate);
// Assert
Assert.Equal(matchingDate.AddDays(1), resultFromPast);
Assert.Equal(futureNonMatchingDate.AddDays(1), resultFromFutureNonMatching);
Assert.Equal(matchingDate.AddDays(1), resultFromFutureMatching);
Assert.Equal(matchingDate, resultFromPast);
Assert.Equal(futureDate, resultFromFutureMatching);
Assert.Equal(matchingDate, resultFromSimpleMatching);
}
/*