public void TestGetLatestLogError() { List <CommandType> lst = new List <CommandType>(); string str; ResultCodeEnum res = HistoryLogger.GetLatestLog(lst, out str); Assert.AreNotEqual(ResultCodeEnum.InvalidCommandType, res); }
public void TestGetLatestLog() { Guid id = Guid.NewGuid(); List <CommandType> lst = new List <CommandType>(); lst.Add(CommandType.SendScheduledMessage); string str; ResultCodeEnum res = HistoryLogger.GetLatestLog(lst, out str); Assert.AreEqual(ResultCodeEnum.RequestAccepted, res); }
/// <summary> /// Method used to get the latest message /// </summary> /// <param name="commandList">list of commands</param> /// <param name="logResponse">The latest message</param> /// <returns>Error code if any</returns> public static ResultCodeEnum GetLatestLog(List <PIS.Ground.Core.Data.CommandType> commandList, out string logResponse) { logResponse = string.Empty; if (HistoryLoggerConfiguration.Used) { return(HistoryLogger.GetLatestLog(commandList, out logResponse)); } else { return(ResultCodeEnum.RequestAccepted); } }