Exemplo n.º 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);
		}
Exemplo n.º 8
0
        public void TestNullKeyRemove()
        {
            ICache cache = new SysCache();

            Assert.Throws <ArgumentNullException>(() => cache.Remove(null));
        }
Exemplo n.º 9
0
        public void TestNullValuePut()
        {
            ICache cache = new SysCache();

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

            Assert.IsNotNull(cache);
        }
Exemplo n.º 11
0
        public void TestNoPropertiesConstructor()
        {
            ICache cache = new SysCache("nunit");

            Assert.IsNotNull(cache);
        }
Exemplo n.º 12
0
        public void TestDefaultConstructor()
        {
            ICache cache = new SysCache();

            Assert.IsNotNull(cache);
        }