Ejemplo n.º 1
0
        public void ClearAllCaches_RemovesAllCacheItems_Success()
        {
            CacheManagerFactory sut = new CacheManagerFactory();

            try
            {
                CacheManager testCache = sut.CreateCache("clear all", new TimeSpan(), false, true);

                Assert.IsNotNull(testCache);
                testCache.Add("test 1", new CacheItem("test 1", true));

                Assert.AreEqual(1, testCache.Count);

                sut.ClearAllCaches();

                Assert.AreEqual(0, testCache.Count);
            }
            finally
            {
                sut.RemoveCache("clear all");
            }
        }