feat: add seating plans for learning groups
This commit is contained in:
@@ -24,13 +24,23 @@ public sealed class PersonalDataExportServiceTests
|
||||
var documentation = new FakeDocumentation();
|
||||
documentation.Add(new Documentation { StudentId = studentId, Title = "Elterngespräch" });
|
||||
|
||||
var service = new PersonalDataExportService(students, groups, memberships, grades, results, entries, documentation);
|
||||
var seatingPlans = new FakeSeatingPlans([
|
||||
new SeatingPlan
|
||||
{
|
||||
GroupId = groupId, Name = "Standard", Room = "B204",
|
||||
Assignments = [new SeatAssignment { Row = 1, Column = 2, StudentId = studentId }],
|
||||
},
|
||||
]);
|
||||
var service = new PersonalDataExportService(students, groups, memberships, grades, results, entries,
|
||||
documentation, seatingPlans);
|
||||
|
||||
var json = service.ExportAsJson(studentId);
|
||||
|
||||
Assert.Contains("Anna", json);
|
||||
Assert.Contains("Elterngespräch", json);
|
||||
Assert.Contains("\"Value\": \"2\"", json);
|
||||
Assert.Contains("\"Sitzplan\": \"Standard\"", json);
|
||||
Assert.Contains("\"Reihe\": 2", json);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -38,7 +48,8 @@ public sealed class PersonalDataExportServiceTests
|
||||
{
|
||||
var service = new PersonalDataExportService(
|
||||
new FakeStudents([]), new FakeGroups([]), new FakeMemberships([]),
|
||||
new FakeGrades(), new FakeResults(), new FakeEntries(), new FakeDocumentation());
|
||||
new FakeGrades(), new FakeResults(), new FakeEntries(), new FakeDocumentation(),
|
||||
new FakeSeatingPlans());
|
||||
|
||||
Assert.Throws<InvalidOperationException>(() => service.ExportAsJson(Guid.NewGuid()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user