Пример #1
0
        public void TestClearAllError()
        {
            Guid id = Guid.NewGuid();
            List <CommandType> lst = new List <CommandType>();
            ResultCodeEnum     res = HistoryLogger.CleanLog(lst);

            Assert.AreNotEqual(ResultCodeEnum.RequestAccepted, res);
        }
Пример #2
0
        public void TestClearAll()
        {
            Guid id = Guid.NewGuid();
            List <CommandType> lst = new List <CommandType>();

            lst.Add(CommandType.CancelScheduledMessage);
            ResultCodeEnum res = HistoryLogger.CleanLog(lst);

            Assert.AreEqual(ResultCodeEnum.RequestAccepted, res);
        }
Пример #3
0
 /// <summary>
 /// Clean the history log database
 /// </summary>
 /// <param name="commandList">list of commands</param>
 /// <returns>Error code if any</returns>
 public static ResultCodeEnum CleanLog(List <PIS.Ground.Core.Data.CommandType> commandList)
 {
     if (HistoryLoggerConfiguration.Used)
     {
         return(HistoryLogger.CleanLog(commandList));
     }
     else
     {
         return(ResultCodeEnum.RequestAccepted);
     }
 }