Tests: the Mesh test's unmarked file holds ids of a type defined in the Mesh assembly (a persisted layout is matched by CLR type name); the appended python record brings its catalog entry beside the cache's

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-14 23:39:50 +02:00
commit bd3477450e
2 changed files with 40 additions and 44 deletions

View file

@ -154,7 +154,7 @@ namespace GameCult.Caching.Tests
var py = pySnapshot.Records.Single(record => record.Key == "py");
change?.Invoke(py);
snapshot.Records = snapshot.Records.Concat(new[] { py }).ToArray();
snapshot.SchemaCatalog = pySnapshot.SchemaCatalog;
snapshot.SchemaCatalog = snapshot.SchemaCatalog.Concat(pySnapshot.SchemaCatalog).GroupBy(entry => entry.SchemaId).Select(group => group.First()).ToArray();
File.WriteAllBytes(path, CultDocumentMessagePackSerialization.SerializeSnapshot(snapshot));
Assert.That(HeaderOf(path), Is.EqualTo(CultPersistedStoreSnapshot.FormatV1), "the foreign writer keeps the v1 it found");
return opened;