Exemplo n.º 1
0
        public void TestNullKeyGet()
        {
            ICache cache = new SysCache();

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

            Assert.IsNull(item);
        }
Exemplo n.º 2
0
        public void TestNullKeyGet()
        {
            ICache cache = new SysCache();

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

            Assert.ShouldNotBeNull(item);
        }
Exemplo n.º 3
0
        public void Index()
        {
            ContentApp     app     = ctx.app.obj as ContentApp;
            ContentSetting setting = app.GetSettingsObj();

            if (setting.CacheSeconds > 0)
            {
                String content = loadFromCache();
                if (strUtil.IsNullOrEmpty(content))
                {
                    content = loadHtml(IndexPage);
                    SysCache.Put(getKey(), content, setting.CacheSeconds);
                }
                actionContent(content);
            }
            else
            {
                run(IndexPage);
            }
        }
Exemplo n.º 4
0
        public void TestNullValuePut()
        {
            ICache cache = new SysCache();

            cache.Put("nunit", null);
        }
Exemplo n.º 5
0
        public void TestNullKeyPut()
        {
            ICache cache = new SysCache();

            cache.Put(null, 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 TestNullKeyPut()
		{
			ICache cache = new SysCache();
			Assert.Throws<ArgumentNullException>(() => cache.Put(null, 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 TestNullKeyPut()
        {
            ICache cache = new SysCache();

            Assert.Throws <ArgumentNullException>(() => cache.Put(null, null));
        }