Caching tests: attaching no store is refused (the argument check had no test)
Found by the scoped mutation run over AddBackingStore. Builds. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6353055b72
commit
0fa836cb46
1 changed files with 8 additions and 0 deletions
|
|
@ -1170,6 +1170,14 @@ namespace GameCult.Caching.Tests
|
|||
Assert.That(store.Attached, Is.Null, "the registry was taken back");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AttachingNoStoreIsRefusedBeforeAnythingIsHeld()
|
||||
{
|
||||
using var cache = new CultCache(CultDocumentRegistry.ForTypes(new[] { typeof(IdDeck) }));
|
||||
|
||||
Assert.Throws<ArgumentNullException>(() => cache.AddBackingStore(null!));
|
||||
}
|
||||
|
||||
private const string ReentryRefusal = "A cacheless write was made inside a call that already holds this store";
|
||||
|
||||
// Until the attach publishes the cache the store's hold is the attach's, so a journal the pull's Admit runs on the attaching
|
||||
|
|
|
|||
Loading…
Reference in a new issue