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 ? } }
public void Counters() { using (dynamic client = new SimpleRedisClient()) { client.del("counter"); // note: missing counts as 0 int a = client.incr("counter"); // 0+1: should be 1 int b = client.incrby("counter", 5); // 1+5, should be 6 int c = client.decr("counter"); // 6-1: should be 5 Assert.AreEqual(1, a, "a"); Assert.AreEqual(6, b, "b"); Assert.AreEqual(5, c, "c"); } }