Jahresplanimport und Ablgeich von Untis
This commit is contained in:
@@ -1028,6 +1028,31 @@ public sealed class RepositoryTests
|
||||
Assert.Empty(repo.GetAll());
|
||||
}
|
||||
|
||||
// ── AnnualPlanEventRepository ────────────────────────────────────────────
|
||||
|
||||
[Fact]
|
||||
public void AnnualPlanEventRepository_GetByRange_FindetAuchUeberlappendeMehrtagstermine()
|
||||
{
|
||||
using var db = NewInMemoryContext();
|
||||
var repo = new AnnualPlanEventRepository(db);
|
||||
repo.Save(new AnnualPlanEvent
|
||||
{
|
||||
ExternalId = "fahrt", Title = "Klassenfahrt",
|
||||
StartDate = new DateOnly(2026, 6, 15), EndDate = new DateOnly(2026, 6, 19), IsAllDay = true,
|
||||
});
|
||||
repo.Save(new AnnualPlanEvent
|
||||
{
|
||||
ExternalId = "spaeter", Title = "Sommerfest",
|
||||
StartDate = new DateOnly(2026, 7, 1), EndDate = new DateOnly(2026, 7, 1), IsAllDay = true,
|
||||
});
|
||||
|
||||
var result = repo.GetByRange(new DateOnly(2026, 6, 17), new DateOnly(2026, 6, 17));
|
||||
|
||||
Assert.Single(result);
|
||||
Assert.Equal("fahrt", result[0].ExternalId);
|
||||
Assert.Equal("fahrt", repo.GetByExternalId("fahrt")!.ExternalId);
|
||||
}
|
||||
|
||||
// ── WorkTaskRepository ────────────────────────────────────────────────────
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user