示例#1
0
		public void TestNullKeyRemove()
		{
			ICache cache = new MemoryCache();

			Executing
				.This(() => cache.Remove(null))
				.Should().Throw<ArgumentNullException>();
		}
示例#2
0
		public void TestNullKeyGet()
		{
			ICache cache = new MemoryCache();
			cache.Put(Key, "value");
			var item = cache.Get(null);

			Assert.IsNull(item);
		}
示例#3
0
		public void TestNullValuePut()
		{
			ICache cache = new MemoryCache();

			Executing
				.This(() => cache.Put(RegionName, null))
				.Should().Throw<ArgumentNullException>();
		}
示例#4
0
		public void TestEmptyProperties()
		{
			ICache cache = new MemoryCache(RegionName, new Dictionary<string, string>());
			Assert.IsNotNull(cache);
		}
示例#5
0
		public void TestNoPropertiesConstructor()
		{
			ICache cache = new MemoryCache(RegionName);
			Assert.IsNotNull(cache);
		}
示例#6
0
		public void TestDefaultConstructor()
		{
			ICache cache = new MemoryCache();
			Assert.IsNotNull(cache);
		}