public async Task SetAndGetCache() { ExampleAdjustableSingleCache cache = new ExampleAdjustableSingleCache(Cache); await cache.SetUpdateCacheItem(MockDictionary); var item = await cache.GetCacheItem(); Assert.IsTrue(item != null && item.ContainsKey("first") && item.ContainsKey("any other")); }
public async Task ClearCache() { ExampleAdjustableSingleCache cache = new ExampleAdjustableSingleCache(Cache); await cache.SetUpdateCacheItem(MockDictionary); await cache.ClearCache(); var item = await cache.GetCacheItem(); Assert.IsTrue(item == null); }