public void ClientGetNameTest() { using(var mock = new MockConnector("localhost", 9999, "$6\r\nmyname\r\n")) using(var redis = new RedisClient(mock)) { Assert.Equal("myname", redis.ClientGetName()); Assert.Equal("*2\r\n$6\r\nCLIENT\r\n$7\r\nGETNAME\r\n", mock.GetMessage()); } }
public void ClientGetNameTest() { using (var mock = new FakeRedisSocket("$6\r\nmyname\r\n")) using (var redis = new RedisClient(mock, new DnsEndPoint("fakehost", 9999))) { Assert.AreEqual("myname", redis.ClientGetName()); Assert.AreEqual("*2\r\n$6\r\nCLIENT\r\n$7\r\nGETNAME\r\n", mock.GetMessage()); } }
public void ClientGetNameTest() { using (var mock = new MockConnector("MockHost", 9999, "$6\r\nmyname\r\n")) using (var redis = new RedisClient(mock)) { Assert.AreEqual("myname", redis.ClientGetName()); Assert.AreEqual("*2\r\n$6\r\nCLIENT\r\n$7\r\nGETNAME\r\n", mock.GetMessage()); } }