Esempio n. 1
0
        public void Counters()
        {
            using (dynamic client = new RedisClient())
            {
                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");
            }
        }