diff --git a/tests/GameCult.Caching.Tests/ConditionalCommitTests.cs b/tests/GameCult.Caching.Tests/ConditionalCommitTests.cs index 9c61328b..137bebb5 100644 --- a/tests/GameCult.Caching.Tests/ConditionalCommitTests.cs +++ b/tests/GameCult.Caching.Tests/ConditionalCommitTests.cs @@ -83,21 +83,18 @@ namespace GameCult.Caching.Tests } [Test] - public void RecordRewrittenUnderAnotherSchemaWithItsStoredAtFailsExpect() + public void RecordRewrittenUnderAnotherSchemaFailsExpect() { SeedDrift(directory: false); using var cache = Drift(false, NarrowDrift).Open(); var observed = cache.Get(DriftKey)!; - var storedAt = cache.GetStored(DriftKey)!.StoredAt; using (var other = Drift(false, ReusedDrift).Open()) { other.BackingStores[0].Push(other.GetStored(DriftKey)!); other.BackingStores[0].PushAll(); } - using (var reader = Drift(false, ReusedDrift).Open()) - Assert.That(reader.GetStored(DriftKey)!.StoredAt, Is.EqualTo(storedAt), "the rewrite kept storedAt"); - Assert.That(DriftCommit(cache, observed, 2), Is.False, "a record rewritten under another schema passed Expect on storedAt alone"); + Assert.That(DriftCommit(cache, observed, 2), Is.False, "a record rewritten under another schema passed Expect"); } // The directory store rewrites only what is pushed to it, so the other writer pushes the record it read unchanged. diff --git a/tests/GameCult.Caching.Tests/VariantTests.cs b/tests/GameCult.Caching.Tests/VariantTests.cs index 62685162..b8c1fb3d 100644 --- a/tests/GameCult.Caching.Tests/VariantTests.cs +++ b/tests/GameCult.Caching.Tests/VariantTests.cs @@ -1265,7 +1265,8 @@ namespace GameCult.Caching.Tests a.Override(nameof(VariantGear.Code), "big") }); }))!; - Assert.That(refused.Message, Does.Contain(BigKey.Value).And.Contain(BaseKey.Value).And.Contain("x")); + Assert.That(refused.Message, Does.Contain(BigKey.Value)); + Assert.That(refused.ChangedKeys, Is.EqualTo(new[] { BaseKey.Value }), "the refusal names the base another writer renamed"); } using var reopened = Open(path, readOnly: true);