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:
parent
b26c98f185
commit
997f3997e6
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue