Exercise CultCache.TryGet<T> again in the OpenAsync durability test

AquaSynth calls TryGet<T>; cover both the hit and the miss.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-13 17:17:14 +02:00
commit 997f3997e6

View file

@ -210,7 +210,10 @@ namespace GameCult.Caching.Tests
cache.Dispose();
var reopened = await CultCacheMessagePack.OpenAsync(filePath);
Assert.That(reopened.Get<NamedTestEntry>(handle.Key)?.Value, Is.EqualTo("magic"));
Assert.That(reopened.TryGet<NamedTestEntry>(handle.Key, out var loaded), Is.True);
Assert.That(loaded?.Value, Is.EqualTo("magic"));
Assert.That(reopened.TryGet<NamedTestEntry>(new CultRecordKey("absent"), out var missing), Is.False);
Assert.That(missing, Is.Null);
}
finally
{