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

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

                Assert.IsNotNull(testCache);

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

            sut.GetCache(null);
        }
Exemplo n.º 3
0
        public void GetCache_CacheNotFound_Throws_InvalidOperationException()
        {
            CacheManagerFactory sut = new CacheManagerFactory();

            Assert.IsNull(sut.GetCache("abcdefg"));
        }
Exemplo n.º 4
0
        public void GetCache_InvalidParam_CacheName_EmptyString_Throws_ArgumentNullException()
        {
            CacheManagerFactory sut = new CacheManagerFactory();

            sut.GetCache("");
        }