예제 #1
0
        public override ICache CreateCache()
        {
            ICache cache = new SysCache();
            cache.Flush(); // ensure the cache is clean before starting

            return cache;
        }
		public void TestNullKeyRemove()
		{
			ICache cache = new SysCache();
			Assert.Throws<ArgumentNullException>(() => cache.Remove(null));
		}
		public void TestNullKeyGet()
		{
			ICache cache = new SysCache();
			cache.Put("nunit", "value");
			object item = cache.Get(null);
			Assert.IsNull(item);
		}
		public void TestNullValuePut()
		{
			ICache cache = new SysCache();
			Assert.Throws<ArgumentNullException>(() => cache.Put("nunit", null));
		}
		public void TestEmptyProperties()
		{
			ICache cache = new SysCache("nunit", new Dictionary<string, string>());
			Assert.IsNotNull(cache);
		}
		public void TestNoPropertiesConstructor()
		{
			ICache cache = new SysCache("nunit");
			Assert.IsNotNull(cache);
		}
		public void TestDefaultConstructor()
		{
			ICache cache = new SysCache();
			Assert.IsNotNull(cache);
		}
예제 #8
0
        public void TestNullKeyRemove()
        {
            ICache cache = new SysCache();

            Assert.Throws <ArgumentNullException>(() => cache.Remove(null));
        }
예제 #9
0
        public void TestNullValuePut()
        {
            ICache cache = new SysCache();

            Assert.Throws <ArgumentNullException>(() => cache.Put("nunit", null));
        }
예제 #10
0
        public void TestEmptyProperties()
        {
            ICache cache = new SysCache("nunit", new Dictionary <string, string>());

            Assert.IsNotNull(cache);
        }
예제 #11
0
        public void TestNoPropertiesConstructor()
        {
            ICache cache = new SysCache("nunit");

            Assert.IsNotNull(cache);
        }
예제 #12
0
        public void TestDefaultConstructor()
        {
            ICache cache = new SysCache();

            Assert.IsNotNull(cache);
        }