public void Can_The_Batch_Result()
        {
            var    operate = new RedisBitOperate(ConfigurationOptions.Parse("localhost"));
            string key     = "RB:Batch";

            operate.Clear(key);

            var positions = new int[] { 5, 6, 7, 8, 9, 10, 11, 12 };

            var results = operate.Set(key, positions, true);

            Assert.False(results.All(r => r));

            results = operate.Set(key, positions, true);
            Assert.True(results.All(r => r));

            results = operate.Get(key, positions);
            Assert.True(results.All(r => r));

            operate.Clear(key);
            results = operate.Get(key, positions);
            Assert.False(results.All(r => r));

            operate.Dispose();
        }
        public void NormalTest()
        {
            var operate = new RedisBitOperate("localhost");

            operate.Set("RB-NormalTest", 0, true);
            Assert.True(operate.Get("RB-NormalTest", 0));
            operate.Dispose();
        }
        public void Can_Close_With_New_Connection()
        {
            var conn = ConnectionMultiplexer.Connect("localhost");

            Assert.True(conn.IsConnected);
            conn.Dispose();
            Assert.False(conn.IsConnected);

            var operate = new RedisBitOperate(conn);

            operate.Set("Can_Close_With_New_Connection", 2, true);
            Assert.True(operate.Get("Can_Close_With_New_Connection", 2));
            operate.Dispose();
        }
        public void Can_Connection_Has_Not_Close()
        {
            var conn = ConnectionMultiplexer.Connect("localhost");

            Assert.True(conn.IsConnected);

            var operate = new RedisBitOperate(conn);

            operate.Set("Can_Connection_Has_Not_Close", 1, true);
            Assert.True(operate.Get("Can_Connection_Has_Not_Close", 1));
            operate.Dispose();

            Assert.True(conn.IsConnected);
        }