[smuxi: 5/5] Engine-Tests: added test-cases for last seen message / highlight



commit 9e449e471cbab7842de22260fec7ea3b0381ac35
Author: Mirco Bauer <meebey meebey net>
Date:   Fri Jun 12 06:08:33 2015 +0200

    Engine-Tests: added test-cases for last seen message / highlight

 src/Engine-Tests/MessageBufferTestsBase.cs |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/src/Engine-Tests/MessageBufferTestsBase.cs b/src/Engine-Tests/MessageBufferTestsBase.cs
index 9b48ac7..43d46b9 100644
--- a/src/Engine-Tests/MessageBufferTestsBase.cs
+++ b/src/Engine-Tests/MessageBufferTestsBase.cs
@@ -1,6 +1,6 @@
 // Smuxi - Smart MUltipleXed Irc
 //
-// Copyright (c) 2011 Mirco Bauer <meebey meebey net>
+// Copyright (c) 2011-2012, 2014, 2015 Mirco Bauer <meebey meebey net>
 //
 // Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
 //
@@ -393,5 +393,29 @@ namespace Smuxi.Engine
             }
             Assert.AreEqual(TestMessages.Count, i);
         }
+
+        [Test]
+        public void LastSeenMessage()
+        {
+            Assert.AreEqual(DateTime.MinValue, Buffer.LastSeenMessage);
+
+            Buffer.LastSeenMessage = TestMessages[0].TimeStamp;
+            Assert.AreEqual(TestMessages[0].TimeStamp, Buffer.LastSeenMessage);
+
+            Buffer.LastSeenMessage = TestMessages[1].TimeStamp;
+            Assert.AreEqual(TestMessages[1].TimeStamp, Buffer.LastSeenMessage);
+        }
+
+        [Test]
+        public void LastSeenHighlight()
+        {
+            Assert.AreEqual(DateTime.MinValue, Buffer.LastSeenHighlight);
+
+            Buffer.LastSeenHighlight = TestMessages[0].TimeStamp;
+            Assert.AreEqual(TestMessages[0].TimeStamp, Buffer.LastSeenHighlight);
+
+            Buffer.LastSeenHighlight = TestMessages[1].TimeStamp;
+            Assert.AreEqual(TestMessages[1].TimeStamp, Buffer.LastSeenHighlight);
+        }
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]