Exemple #1
0
        public async Task LastSaveAsync_RedisServer_ServerMethodCorrectResult()
        {
            var result = await _redisServer.LastSaveAsync();

            Assert.That(result, Is.EqualTo(new DateTime(2014, 12, 3)));
            _serverMock.Verify(x => x.LastSaveAsync(CommandFlags.None), Times.Once);
        }
 public async Task <DateTime?> LastSaveAsync(CommandFlags flags = CommandFlags.None)
 {
     try
     {
         return(_redisServer == null
   ? null
   : await _redisServer.LastSaveAsync(flags)
                .ConfigureAwait(false));
     }
     catch (Exception e)
     {
         LogError(e);
         return(null);
     }
 }