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"); } }
public void GetCacheIfExists_CacheNotFound_Returns_Null() { CacheManagerFactory sut = new CacheManagerFactory(); Assert.IsNull(sut.GetCacheIfExists("abcdefg")); }
public void GetCacheIfExists_InvalidParam_CacheName_EmptyString_Throws_ArgumentNullException() { CacheManagerFactory sut = new CacheManagerFactory(); sut.GetCacheIfExists(""); }