From 648045a201ecb4a6cd1b7e7c16f250f2d4731975 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 27 Oct 2026 17:48:44 +0100 Subject: [PATCH] Tests: a lookup over several written entries shadows by the entry that has the id Co-Authored-By: Claude Opus 5.5 --- tests/GameCult.Caching.Tests/RestampOnWriteTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/GameCult.Caching.Tests/RestampOnWriteTests.cs b/tests/GameCult.Caching.Tests/RestampOnWriteTests.cs index 00bf196f..561db4fa 100644 --- a/tests/GameCult.Caching.Tests/RestampOnWriteTests.cs +++ b/tests/GameCult.Caching.Tests/RestampOnWriteTests.cs @@ -667,6 +667,11 @@ namespace GameCult.Caching.Tests Assert.That(lookup.Owner(lister.SchemaId)!.SchemaId, Is.EqualTo(lister.SchemaId)); Assert.That(lookup.Listing(ListerOldId).Select(entry => entry.SchemaId), Is.EqualTo(new[] { lister.SchemaId })); Assert.That(lookup.Named(lister.SchemaName).Select(entry => entry.SchemaId), Is.EqualTo(new[] { lister.SchemaId })); + + // A write of several entries shadows by the entry that has the id, not by all of them having it. + var other = CultDocumentRegistry.ForTypes(new[] { typeof(NoteOther) }).GetRequired().ToCatalogEntry(); + var several = new CatalogEntryLookup(new[] { other, written }, NarrowListerRegistry); + Assert.That(several.Named(written.SchemaName), Is.EqualTo(new[] { written }).Using((x, y) => ReferenceEquals(x, y))); } // The registry's other types change nothing about a record the written type claims itself.