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); }
public void Dispose_ObjectDisposedExceptionAfterDispose() { Cache = new VolatileCache(new VolatileCacheSettings()); Cache.Dispose(); Assert.Throws <ObjectDisposedException>(() => { Cache.Count(); }); }