コード例 #1
0
        public void LastSave_RedisServer_ServerMethodCorrectResult()
        {
            var result = _redisServer.LastSave();

            Assert.That(result, Is.EqualTo(new DateTime(2014, 12, 3)));
            _serverMock.Verify(x => x.LastSave(CommandFlags.None), Times.Once);
        }
コード例 #2
0
 public DateTime?LastSave(CommandFlags flags = CommandFlags.None)
 {
     try
     {
         return(_redisServer?.LastSave(flags));
     }
     catch (Exception e)
     {
         LogError(e);
         return(null);
     }
 }