public async Task TestNoCacheObjectAsync() { var cache = new NoCache(); int hits = 0; Func <Task <string> > getter = async() => { await Task.Delay(10); hits++; return(hits.ToString()); }; string result; result = await cache.GetAsync("key", getter); Assert.AreEqual(1, hits); Assert.AreEqual("1", result); result = await cache.GetAsync("key", getter); Assert.AreEqual(2, hits); Assert.AreEqual("2", result); }