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
@@ -11,6 +11,25 @@ public sealed class EventApplierTests
|
||||
private static LiteDbContext NewInMemoryContext() => new(new MemoryStream());
|
||||
private static readonly byte[] Key = SyncCrypto.GenerateKey();
|
||||
|
||||
[Fact]
|
||||
public async Task ApplyAsync_StudentGroupPlan_SynchronisiertEinteilungUndLoeschung()
|
||||
{
|
||||
using var db = NewInMemoryContext();
|
||||
var applier = new EventApplier(db, Key);
|
||||
var studentId = Guid.NewGuid();
|
||||
var plan = new StudentGroupPlan
|
||||
{
|
||||
GroupId = Guid.NewGuid(), Name = "Projektwoche",
|
||||
Groups = [new StudentGroupPlanGroup { StudentIds = [studentId] }],
|
||||
};
|
||||
|
||||
await applier.ApplyAsync(MakeEvent(nameof(StudentGroupPlan), plan.Id.ToString(), "Save", plan));
|
||||
Assert.Equal(studentId, db.StudentGroupPlans.FindById(plan.Id)!.Groups[0].StudentIds[0]);
|
||||
|
||||
await applier.ApplyAsync(MakeEvent(nameof(StudentGroupPlan), plan.Id.ToString(), "Delete", null));
|
||||
Assert.Null(db.StudentGroupPlans.FindById(plan.Id));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ApplyAsync_Save_SchreibtEntitaetDirektInDieCollection()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user