예제 #1
0
 public void DoomedToFail()
 {
     using (dynamic client = new SimpleRedisClient())
     {
         client.set("fail_incr", "some val"); // give it a value initially
         client.incr("fail_incr");            // what is numeric "some val" + 1 ?
     }
 }
예제 #2
0
 public void GetSet()
 {
     using (dynamic client = new SimpleRedisClient())
     {
         client.del("Get Set");              // wipe
         client.set("Get Set", "emosh");     // assign
         string val = client.get("Get Set"); // fetch
         Assert.AreEqual("emosh", val);
     }
 }
예제 #3
0
        public void DeleteResult()
        {
            using (dynamic client = new SimpleRedisClient())
            {
                client.set("delete", "some val");   // give it a value initially
                bool first  = client.del("delete"); // was deleted: true
                bool second = client.del("delete"); // no longer existed: false

                Assert.IsTrue(first);
                Assert.IsFalse(second);
            }
        }