Пример #1
0
        public void StaticCacheHandler_GetValueWithArea_NoExistingItems()
        {
            ICacheService handler = new LocalCacheService();
            object        value   = handler.GetCacheValue("LocalCacheService_GetValueWithRegion_NoExistingItems", "area1");

            Assert.Null(value);
        }
Пример #2
0
        public void StaticCacheHandler_Get_None()
        {
            ICacheService handler = new LocalCacheService();

            object value = handler.GetCacheValue("key", "area");

            Assert.Null(value);
        }
Пример #3
0
        public void StaticCacheHandler_GetWithDifferentType_Found()
        {
            ICacheService handler = new LocalCacheService();

            handler.PutCacheValue("key", "val1", "area");

            AuthorityReport site = handler.GetCacheValue <AuthorityReport>("key", "area");

            Assert.Null(site);
        }
Пример #4
0
        public void StaticCacheHandler_GetWithType_Found()
        {
            ICacheService handler = new LocalCacheService();

            handler.PutCacheValue("key", "val1", "area");

            string value = handler.GetCacheValue <string>("key", "area");

            Assert.Equal("val1", value);
        }
Пример #5
0
        public void StaticCacheHandler_Get_Found()
        {
            ICacheService handler = new LocalCacheService();

            handler.PutCacheValue("key", "val1", "area");

            object value = handler.GetCacheValue("key", "area");

            Assert.Equal("val1", value);
        }
Пример #6
0
        public void StaticCacheHandler_RetrieveStoredItem()
        {
            ICacheService handler = new LocalCacheService();

            handler.PutCacheValue("LocalCacheService_RetrieveStoredItem", "value1", "area1");
            object value = handler.GetCacheValue("LocalCacheService_RetrieveStoredItem", "area1");

            Assert.NotNull(value);
            Assert.Equal("value1", value);
        }
Пример #7
0
        public void StaticCacheHandler_RemoveCacheValue()
        {
            ICacheService handler = new LocalCacheService();

            handler.PutCacheValue("key", "val1", "area");

            handler.RemoveCacheValue("key", "area");

            object value = handler.GetCacheValue("key", "area");

            Assert.Null(value);
        }