Example #1
0
 public void TestNullKeyPut()
 {
     ICache cache = new MemoryCache();
     Assert.Throws<ArgumentNullException>(() => cache.Put(null, null));
 }
Example #2
0
 public void TestNullValuePut()
 {
     ICache cache = new MemoryCache();
     Assert.Throws<ArgumentNullException>(() => cache.Put("nunit", null));
 }
Example #3
0
 public void TestNullKeyGet()
 {
     ICache cache = new MemoryCache();
     cache.Put("nunit", "value");
     object item = cache.Get(null);
     Assert.IsNull(item);
 }