=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
@@ -18,6 +18,7 @@ public class CacheServiceTest
/// Initializes the test environment by creating a <see cref="LockManagerService"/> with a mock logger
/// and an in-memory lock provider, and instantiating the <see cref="CacheService"/> under test with that lock manager.
/// </summary>
/// <!-- aidoc:v1 sig=d8eb19f body=0002dc3 -->
[SetUp]
public void SetUp()
{
@@ -55,6 +56,7 @@ public class CacheServiceTest
/// <summary>
/// Verifies that <c>GetOrSetObjectAsync</c> invokes the supplied factory on the first call, persists the produced value, and on subsequent calls returns the cached value without invoking the factory again.
/// </summary>
/// <!-- aidoc:v1 sig=9730504 body=5d35764 -->
[Test]
public async Task GetOrSetObjectAsync_InvokesFactory_StoresResult_AndDoesNotInvokeAgainOnSecondCall()
{
@@ -89,6 +91,7 @@ public class CacheServiceTest
/// <summary>
/// Verifies that <c>GetOrSetObjectAsync</c> does not cache <see langword="null"/> results, ensuring the factory delegate is re-invoked on subsequent calls for the same key when the previously produced value was <see langword="null"/>.
/// </summary>
/// <!-- aidoc:v1 sig=bb0d5c2 body=179c9ee -->
[Test]
public async Task GetOrSetObjectAsync_DoesNotCacheNullResult_AndInvokesFactoryOnSubsequentCalls()
{
@@ -118,6 +121,7 @@ public class CacheServiceTest
/// the second thread does not invoke its factory if the first thread has already inserted the value,
/// and both threads receive the value produced by the first thread's factory.
/// </summary>
/// <!-- aidoc:v1 sig=6a067fe body=858fc91 -->
[Test]
public async Task GetOrSetObjectAsync_SecondCheckInLock_PreventsFactoryExecution_WhenValueAlreadyInsertedByFirstThread()
{
@@ -161,6 +165,7 @@ public class CacheServiceTest
/// <summary>
/// Verifies that calling <c>DeleteObjectAsync</c> removes the stored value for the given key, and that the next call to <c>GetOrSetObjectAsync</c> invokes the factory delegate to produce a new value instead of returning a previously cached one.
/// </summary>
/// <!-- aidoc:v1 sig=c88be79 body=aaf8770 -->
[Test]
public async Task DeleteObjectAsync_RemovesKey_AndFactoryIsInvokedOnNextCall()
{
@@ -188,6 +193,7 @@ public class CacheServiceTest
/// <summary>
/// Verifies that <c>DeleteByPatternAsync</c> removes only the cache entries whose keys match the supplied pattern while preserving unrelated keys that do not match.
/// </summary>
/// <!-- aidoc:v1 sig=395241c body=7523f89 -->
[Test]
public async Task DeleteByPatternAsync_RemovesMatchingKeys_AndKeepsNonMatchingKeys()
{
@@ -214,6 +220,7 @@ public class CacheServiceTest
/// Verifies that <c>CleanCache</c> removes all entries from the cache, causing subsequent
/// <c>GetOrSetObjectAsync</c> calls to invoke the provided factory delegate to repopulate the value.
/// </summary>
/// <!-- aidoc:v1 sig=3336c2b body=de2514b -->
[Test]
public async Task CleanCache_RemovesAllKeys_AndFactoryIsInvokedAfterClean()
{