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)); }
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)); }