Exemplo n.º 1
0
        public void GetCacheIfExists_CacheFound_Returns_ValidCacheManager()
        {
            CacheManagerFactory sut = new CacheManagerFactory();

            try
            {
                CacheManager testCache = sut.CreateCache("test123a", new TimeSpan());

                Assert.IsNotNull(testCache);

                Assert.IsNotNull(sut.GetCacheIfExists("test123a"));
            }
            finally
            {
                sut.RemoveCache("test123a");
            }
        }
Exemplo n.º 2
0
        public void GetCacheIfExists_CacheNotFound_Returns_Null()
        {
            CacheManagerFactory sut = new CacheManagerFactory();

            Assert.IsNull(sut.GetCacheIfExists("abcdefg"));
        }
Exemplo n.º 3
0
        public void GetCacheIfExists_InvalidParam_CacheName_EmptyString_Throws_ArgumentNullException()
        {
            CacheManagerFactory sut = new CacheManagerFactory();

            sut.GetCacheIfExists("");
        }