Implement interval intersection and subtraction methods in GridCoverage, update GridPlan and related DTOs for PlanNote integration
Added new methods for intersecting and subtracting time intervals in the GridCoverage class to enhance scheduling capabilities. Updated the GridPlan and GridPlanDto classes to replace string notes with a structured PlanNote type, improving note management. Enhanced the GridPlanner class to utilize these new features, ensuring better handling of scheduling conflicts and notes during grid generation. Adjusted related tests to validate the new functionality.
This commit is contained in:
@@ -78,7 +78,7 @@ public class GridPlanPreviewTests
|
||||
Slot("Повтор", SlotKind.Repeat, SlotBlockMode.FillSlot, 1),
|
||||
Slot("Конец вещания", SlotKind.SignOff, SlotBlockMode.FillSlot, 1),
|
||||
],
|
||||
["замечание"],
|
||||
[new PlanNote(false, "замечание")],
|
||||
SlotsToRemove: 4,
|
||||
FallbackGroupId: Guid.NewGuid(),
|
||||
FallbackGroupName: "Фон",
|
||||
@@ -92,7 +92,7 @@ public class GridPlanPreviewTests
|
||||
Assert.Equal(plan.Profile.Name, dto.ProfileName);
|
||||
Assert.Equal(4, dto.SlotsToRemove);
|
||||
Assert.Equal("Фон", dto.FallbackGroupName);
|
||||
Assert.Equal(["замечание"], dto.Notes);
|
||||
Assert.Equal(["замечание"], dto.Notes.Select(n => n.Text));
|
||||
|
||||
// Описание блока — то, что читает админ вместо режима и числа.
|
||||
Assert.Equal(
|
||||
|
||||
Reference in New Issue
Block a user