Esempio n. 1
0
        public async Task ConfigGetAsync_RedisServer_ServerMethodCorrectResult()
        {
            var result = await _redisServer.ConfigGetAsync("pattern*");

            Assert.That(result.First()
                        .Key, Is.EqualTo("config1"));
            Assert.That(result.First()
                        .Value, Is.EqualTo("abcdefgh"));
            _serverMock.Verify(x => x.ConfigGetAsync("pattern*", CommandFlags.None), Times.Once);
        }
 public async Task <KeyValuePair <string, string>[]> ConfigGetAsync(string pattern = default, CommandFlags flags = CommandFlags.None)
 {
     try
     {
         return(_redisServer == null
   ? null
   : await _redisServer.ConfigGetAsync(pattern, flags)
                .ConfigureAwait(false));
     }
     catch (Exception e)
     {
         LogError(e);
         return(null);
     }
 }