예제 #1
0
        public static void AssertNoWarning(this MessageCollection collection)
        {
            var warningCount = collection.Count(m => m.Severity == MessageSeverity.Warning);

            if (warningCount > 0)
            {
                Assert.Fail($"{warningCount} warning(s) found\n{collection}");
            }
        }
예제 #2
0
        public static void AssertNoError(this MessageCollection collection)
        {
            var errorCount = collection.Count(m => m.Severity == MessageSeverity.Error);

            if (errorCount > 0)
            {
                Assert.Fail($"{errorCount} error(s) found\n{collection}");
            }
        }
예제 #3
0
 private void load_ticket_comments()
 {
     var comms = CrmData.get_ticket_comments(_ticketID);
     _messages = new MessageCollection();
     foreach (var comm in comms)
     {
         _messages.Add(new Message { Side = MessageSide.You, Author=comm.owner, Text = comm.comment, Timestamp=DateTime.Parse(comm.comment_date) });
     }
     conversationView.DataContext = _messages;
     lblC.Content = string.Format("Comments ({0})", _messages.Count());
     txtComment.Text = "";
 }