diff --git a/tests/GameCult.Caching.Tests/SlotReadOnlyTests.cs b/tests/GameCult.Caching.Tests/SlotReadOnlyTests.cs index 040d9c97..f0caf141 100644 --- a/tests/GameCult.Caching.Tests/SlotReadOnlyTests.cs +++ b/tests/GameCult.Caching.Tests/SlotReadOnlyTests.cs @@ -106,7 +106,7 @@ namespace GameCult.Caching.Tests } private string SeedSurface(string vector) => - Seed(SurfaceRegistry, typeof(Surface), () => new Surface { Id = "x" }, UnionParityVectorTests.Committed(vector)); + Seed(SurfaceRegistry, typeof(Surface), () => new Surface { Id = "x" }, VectorFiles.Committed("union-parity", vector)); private static CultStoredDocument Stored(CultCache cache, CultRecordKey key) => cache.GetStored(key)!; @@ -138,7 +138,7 @@ namespace GameCult.Caching.Tests [Test] public void AUnitArmWithAnExtraSlotHoldsTheRecordReadOnly() { - var arm = UnionParityVectorTests.Committed("extra-slot-unit-arm.msgpack"); + var arm = VectorFiles.Committed("union-parity", "extra-slot-unit-arm.msgpack"); var payload = Emit((ref MessagePackWriter w) => { w.WriteArrayHeader(2); w.Write("u"); w.WriteRaw(arm); }); var path = Seed(UnitRegistry, typeof(UnitDoc), () => new UnitDoc { Name = "u" }, payload); using var cache = Open(path, UnitRegistry); @@ -214,7 +214,7 @@ namespace GameCult.Caching.Tests [TestCase("extra-slot-nested-record.msgpack", false, TestName = "ANestedMarkBesideACatalogReportedSlotIsNotConsentedTo")] public void ACompatibleIdConsentsOnlyToTheDepthZeroSlotTheCatalogReports(string vector, bool consented) { - var original = UnionParityVectorTests.Committed(vector); + var original = VectorFiles.Committed("union-parity", vector); var path = Seed(SurfaceRegistry, typeof(Surface), () => new Surface { Id = "x" }, AppendRootSlot(original, "wider writer")); var snapshot = CultDocumentMessagePackSerialization.DeserializeSnapshot(File.ReadAllBytes(path)); var entry = snapshot.SchemaCatalog.Single(); @@ -265,7 +265,7 @@ namespace GameCult.Caching.Tests public void AMarkedRecordIsCarriedByteForByteWhenAnotherRecordIsWritten() { var path = Path.Combine(_directory, "extra-slot-store.cc"); - File.WriteAllBytes(path, UnionParityVectorTests.Committed("extra-slot-store.cc")); + File.WriteAllBytes(path, VectorFiles.Committed("union-parity", "extra-slot-store.cc")); var before = CultDocumentMessagePackSerialization.DeserializeSnapshot(File.ReadAllBytes(path)); var original = before.Records.Single(record => record.Key == Marked.Value); using (var cache = Open(path, SurfaceRegistry)) diff --git a/tests/GameCult.Caching.Tests/UnionParityVectorTests.cs b/tests/GameCult.Caching.Tests/UnionParityVectorTests.cs index 08a37243..22ef82c9 100644 --- a/tests/GameCult.Caching.Tests/UnionParityVectorTests.cs +++ b/tests/GameCult.Caching.Tests/UnionParityVectorTests.cs @@ -58,7 +58,7 @@ namespace GameCult.Caching.Tests Assert.That(Convert.ToHexString(reference), Is.EqualTo(Convert.ToHexString(File.ReadAllBytes(path))), $"vector {name}"); } - internal static byte[] Committed(string name) + private static byte[] Committed(string name) { var path = VectorPath(name); Assert.That(File.Exists(path), Is.True, $"vector {name} is committed"); diff --git a/tests/GameCult.Caching.Tests/VariantTests.cs b/tests/GameCult.Caching.Tests/VariantTests.cs index 020490fe..cdbdcf58 100644 --- a/tests/GameCult.Caching.Tests/VariantTests.cs +++ b/tests/GameCult.Caching.Tests/VariantTests.cs @@ -513,7 +513,7 @@ namespace GameCult.Caching.Tests } [Test] - public void AnOverrideOfASlotTheTypeNeverHadIsIgnoredOnLoadAsAPlainRecordIgnoresAnExtraSlot() + public void AnOverrideOfASlotTheTypeNeverHadIsReadPastOnLoadAsAPlainRecordReadsPastAnExtraSlot() { var path = WriteStore(PlainGear("hand-base"), OverridingRecord("hand-variant", "hand-base", CultVariantOverride.Set(99, new byte[] { 0x01 }),