public void TryRemove()
 {
     var fake = A.Fake<IOutputCacheConnection>();
     A.CallTo(() => fake.Remove("key1"));
     DateTime utcExpiry = DateTime.Now;
     RedisOutputCacheProvider cache = new RedisOutputCacheProvider();
     cache.cache = fake;
     cache.Remove("key1");
     A.CallTo(() => fake.Remove("key1")).MustHaveHappened();
 }
 public void RemoveWithoutSetTest()
 {
     using (RedisServer Server = new RedisServer())
     {
         RedisOutputCacheProvider provider = new RedisOutputCacheProvider();
         NameValueCollection config = new NameValueCollection();
         config.Add("ssl", "false");
         provider.Initialize("name", config);
         provider.Remove("key6");
         object data = provider.Get("key6");
         Assert.Equal(null, data);
     }
 }
        public void RemoveTest()
        {
            using (RedisServer Server = new RedisServer())
            {
                RedisOutputCacheProvider provider = new RedisOutputCacheProvider();
                NameValueCollection config = new NameValueCollection();
                config.Add("ssl", "false");
                provider.Initialize("name", config);

                DateTime utxExpiry = DateTime.UtcNow.AddMinutes(3);
                provider.Set("key7", "data7", utxExpiry);
                provider.Remove("key7");
                object data = provider.Get("key7");
                Assert.Equal(null, data);
            }
        }