Exemplo n.º 1
0
        public async Task GetEmptyCacheLoadFromSource()
        {
            ExampleSourceCache cache = new ExampleSourceCache(Cache);
            var item = await cache.GetCacheItem();

            Assert.IsTrue(item != null && item.ContainsKey("first") && item["first"] == "time");
        }
Exemplo n.º 2
0
        public async Task CacheRefreshLoadFromSource()
        {
            ExampleSourceCache cache = new ExampleSourceCache(Cache);
            var item = await cache.GetCacheItem();

            await cache.RefreshCache();

            item = await cache.GetCacheItem();

            Assert.IsTrue(item != null && item.ContainsKey("any other") && item["any other"] == "time");
        }