Example #1
0
        public void NewCache_GoodName(string name)
        {
            ICache cache = new VolatileCache(new VolatileCacheSettings {
                CacheName = name
            }, clock: Kernel.Get <IClock>());

            Assert.That(cache, Is.Not.Null);
            cache.Dispose();
            Assert.That(cache.Disposed, Is.True);
        }
Example #2
0
 public void Dispose_ObjectDisposedExceptionAfterDispose()
 {
     Cache = new VolatileCache(new VolatileCacheSettings());
     Cache.Dispose();
     Assert.Throws <ObjectDisposedException>(() => { Cache.Count(); });
 }