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); }
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); }