Add animated classroom grouping with saved editable plans
CI / build-and-test (push) Canceled after 0s
CI / build-and-test (push) Canceled after 0s
This commit is contained in:
1 parent
d4b1419f9a
commit
f0462bd2a1
27 files changed
+775
-46
No files matched your search
@@ -31,8 +31,14 @@ public sealed class PersonalDataExportServiceTests
|
||||
Assignments = [new SeatAssignment { Row = 1, Column = 2, StudentId = studentId }],
|
||||
},
|
||||
]);
|
||||
var groupPlans = new FakeStudentGroupPlans();
|
||||
groupPlans.Save(new StudentGroupPlan
|
||||
{
|
||||
GroupId = groupId, Name = "Projektwoche",
|
||||
Groups = [new StudentGroupPlanGroup { StudentIds = [studentId] }],
|
||||
});
|
||||
var service = new PersonalDataExportService(students, groups, memberships, grades, results, entries,
|
||||
documentation, seatingPlans);
|
||||
documentation, seatingPlans, groupPlans);
|
||||
|
||||
var json = service.ExportAsJson(studentId);
|
||||
|
||||
@@ -41,6 +47,7 @@ public sealed class PersonalDataExportServiceTests
|
||||
Assert.Contains("\"Value\": \"2\"", json);
|
||||
Assert.Contains("\"Sitzplan\": \"Standard\"", json);
|
||||
Assert.Contains("\"Reihe\": 2", json);
|
||||
Assert.Contains("Projektwoche", json);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -53,4 +60,23 @@ public sealed class PersonalDataExportServiceTests
|
||||
|
||||
Assert.Throws<InvalidOperationException>(() => service.ExportAsJson(Guid.NewGuid()));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExportAsJson_EnthaeltGespeichertenPlanAuchNachEndeDerMitgliedschaft()
|
||||
{
|
||||
var student = new Student { FirstName = "Anna", LastName = "Beispiel" };
|
||||
var groupId = Guid.NewGuid();
|
||||
var plans = new FakeStudentGroupPlans();
|
||||
plans.Save(new StudentGroupPlan
|
||||
{
|
||||
GroupId = groupId, Name = "Alte Projektgruppe",
|
||||
Groups = [new StudentGroupPlanGroup { StudentIds = [student.Id] }],
|
||||
});
|
||||
var service = new PersonalDataExportService(
|
||||
new FakeStudents([student]), new FakeGroups([]), new FakeMemberships([]),
|
||||
new FakeGrades(), new FakeResults(), new FakeEntries(), new FakeDocumentation(),
|
||||
new FakeSeatingPlans(), plans);
|
||||
|
||||
Assert.Contains("Alte Projektgruppe", service.ExportAsJson(student.Id));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user