Catel.Test.Caching.CacheStorageFacts.TheGetFromCacheOrFetchMethod.AddsItemToCacheAndReturnsIt C# (CSharp) Method

AddsItemToCacheAndReturnsIt() private method

private AddsItemToCacheAndReturnsIt ( ) : void
return void
            public void AddsItemToCacheAndReturnsIt()
            {
                var cache = new CacheStorage<string, int>();

                var value = cache.GetFromCacheOrFetch("1", () => 1);

                Assert.IsTrue(cache.Contains("1"));
                Assert.AreEqual(1, cache["1"]);
                Assert.AreEqual(1, value);
            }