예제 #1
0
 public void BgRewriteAofTest()
 {
     using(var mock = new MockConnector("localhost", 9999, "+OK\r\n"))
     using(var redis = new RedisClient(mock))
     {
         Assert.True(redis.BgRewriteAof());
         Assert.Equal("*1\r\n$12\r\nBGREWRITEAOF\r\n", mock.GetMessage());
     }
 }
예제 #2
0
 public void BgRewriteAofTest()
 {
     using (var mock = new FakeRedisSocket("+OK\r\n"))
     using (var redis = new RedisClient(mock, new DnsEndPoint("fakehost", 9999)))
     {
         Assert.AreEqual("OK", redis.BgRewriteAof());
         Assert.AreEqual("*1\r\n$12\r\nBGREWRITEAOF\r\n", mock.GetMessage());
     }
 }
예제 #3
0
 public void BgRewriteAofTest()
 {
     using (var mock = new MockConnector("MockHost", 9999, "+OK\r\n"))
         using (var redis = new RedisClient(mock))
         {
             Assert.AreEqual("OK", redis.BgRewriteAof());
             Assert.AreEqual("*1\r\n$12\r\nBGREWRITEAOF\r\n", mock.GetMessage());
         }
 }
예제 #4
0
 public void BgRewriteAofTest()
 {
     using (var mock = new FakeRedisSocket("+OK\r\n"))
         using (var redis = new RedisClient(mock, new DnsEndPoint("fakehost", 9999)))
         {
             Assert.AreEqual("OK", redis.BgRewriteAof());
             Assert.AreEqual("*1\r\n$12\r\nBGREWRITEAOF\r\n", mock.GetMessage());
         }
 }
예제 #5
0
 public void AOFSave()
 {
     redisClient.BgRewriteAof();
 }