Example #1
0
        public void TestNullKeyGet()
        {
            ICache cache = new RtMemoryCache();

            cache.Put("nunit", "value");
            object item = cache.Get(null);

            Assert.IsNull(item);
        }
Example #2
0
        public void TestNullKeyRemove()
        {
            ICache cache = new RtMemoryCache();

            Assert.Throws <ArgumentNullException>(() => cache.Remove(null));
        }
Example #3
0
        public void TestNullValuePut()
        {
            ICache cache = new RtMemoryCache();

            Assert.Throws <ArgumentNullException>(() => cache.Put("nunit", null));
        }
Example #4
0
        public void TestNoPropertiesConstructor()
        {
            ICache cache = new RtMemoryCache("nunit");

            Assert.IsNotNull(cache);
        }
Example #5
0
        public void TestEmptyProperties()
        {
            ICache cache = new RtMemoryCache("nunit", new Dictionary <string, string>());

            Assert.IsNotNull(cache);
        }
		public void TestNullKeyRemove()
		{
			ICache cache = new RtMemoryCache();
			Assert.Throws<ArgumentNullException>(() => cache.Remove(null));
		}
Example #7
0
        public void TestDefaultConstructor()
        {
            ICache cache = new RtMemoryCache();

            Assert.IsNotNull(cache);
        }
		public void TestNullKeyGet()
		{
			ICache cache = new RtMemoryCache();
			cache.Put("nunit", "value");
			object item = cache.Get(null);
			Assert.IsNull(item);
		}
		public void TestNullValuePut()
		{
			ICache cache = new RtMemoryCache();
			Assert.Throws<ArgumentNullException>(() => cache.Put("nunit", null));
		}
		public void TestEmptyProperties()
		{
			ICache cache = new RtMemoryCache("nunit", new Dictionary<string, string>());
			Assert.IsNotNull(cache);
		}
		public void TestNoPropertiesConstructor()
		{
			ICache cache = new RtMemoryCache("nunit");
			Assert.IsNotNull(cache);
		}
		public void TestDefaultConstructor()
		{
			ICache cache = new RtMemoryCache();
			Assert.IsNotNull(cache);
		}