示例#1
0
 public void MemoizationCacheFactoryExtensions_Synchronized_ArgumentChecking()
 {
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheFactoryExtensions.Synchronized(factory: null));
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheFactoryExtensions.Synchronized(MemoizationCacheFactory.Unbounded).Create(default(Func <int, int>), MemoizationOptions.None, EqualityComparer <int> .Default));
 }
示例#2
0
 public void MemoizationCacheFactoryExtensions_WithThreadLocal_ArgumentChecking()
 {
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheFactoryExtensions.WithThreadLocal(factory: null));
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheFactoryExtensions.WithThreadLocal(factory: null, exposeThreadLocalView: false));
     Assert.ThrowsException <ArgumentNullException>(() => MemoizationCacheFactoryExtensions.WithThreadLocal(MemoizationCacheFactory.Unbounded).Create(default(Func <int, int>), MemoizationOptions.None, EqualityComparer <int> .Default));
 }