VariantTests: the store-less rebase test builds its cache with the codec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-28 05:12:19 +01:00
commit 36873e696e

View file

@ -286,7 +286,7 @@ namespace GameCult.Caching.Tests
[Test]
public void ARebaseOntoABaseOfAnotherTypeIsRefusedWithoutAStore()
{
using var cache = new CultCache(Registry);
using var cache = new CultCache(Registry, CultCacheMessagePack.CreateCodec(Registry));
SeedBase(cache);
SeedBig(cache);
var other = new CultRecordKey("other");
@ -418,7 +418,7 @@ namespace GameCult.Caching.Tests
[Test]
public void ACacheWithoutACodecHoldsNoVariants()
{
using var cache = new CultCache(Registry);
using var cache = new CultCache(Registry, CultCacheMessagePack.CreateCodec(Registry));
cache.Commit(batch => batch.Upsert(typeof(VariantGear), Laser(), BaseKey));
var error = Refused(() => cache.UpsertVariantAsync(BigKey, BaseKey).GetAwaiter().GetResult());
Assert.That(error.Message, Does.Contain(BigKey.Value).And.Contain("codec"));