public void MemoizationCacheExtensions_AsTrimmable_ArgumentChecking()
 {
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheExtensions.AsTrimmableByMetrics(default(IMemoizationCache)));
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheExtensions.AsTrimmableByArgumentAndResult <int, int>(default(IMemoizationCache)));
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheExtensions.AsTrimmableByArgumentAndResult <int, int>(default(IMemoizationCache <int, int>)));
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheExtensions.AsTrimmableByArgumentAndResultOrError <int, int>(default(IMemoizationCache)));
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheExtensions.AsTrimmableByArgumentAndResultOrError <int, int>(default(IMemoizationCache <int, int>)));
 }
        public void MemoizationCacheExtensions_AsTrimmable_HasNoService()
        {
            var c = new MyCache <int, int>(false);

            Assert.IsNull(MemoizationCacheExtensions.AsTrimmableByMetrics(c));
            Assert.IsNull(MemoizationCacheExtensions.AsTrimmableByArgumentAndResult <int, int>(c));
            Assert.IsNull(MemoizationCacheExtensions.AsTrimmableByArgumentAndResult <int, int>((IMemoizationCache)c));
            Assert.IsNull(MemoizationCacheExtensions.AsTrimmableByArgumentAndResultOrError <int, int>(c));
            Assert.IsNull(MemoizationCacheExtensions.AsTrimmableByArgumentAndResultOrError <int, int>((IMemoizationCache)c));
        }