示例#1
0
        public void BuildsDiffCorrectly()
        {
            Log<ChatMessage> chatMsgLog = new Log<ChatMessage>();

            chatMsgLog.Add(new ChatMessage() { ClientName = "1", Message = "beef" });
            chatMsgLog.Add(new ChatMessage() { ClientName = "2", Message = "stick" });

            Assert.AreEqual(2, chatMsgLog.GetDiff().Count);
            Assert.AreEqual("stick", chatMsgLog.GetDiff()[0].Message);
            Assert.AreEqual("beef", chatMsgLog.GetDiff()[1].Message);
        }
示例#2
0
        public void CleanResultsInEmptyDiff()
        {
            Log<ChatMessage> chatMsgLog = new Log<ChatMessage>();
            chatMsgLog.Add(new ChatMessage() { ClientName = "1", Message = "beef" });
            chatMsgLog.Add(new ChatMessage() { ClientName = "2", Message = "stick" });

            chatMsgLog.Clean();

            Assert.AreEqual(0, chatMsgLog.GetDiff().Count);
        }