about summary refs log tree commit diff
path: root/IRCSharp.Tests/State/Motd.cs
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2020-11-10 18:35:21 -0500
committerBen Harris <ben@tilde.team>2020-11-10 18:35:21 -0500
commit35bbd30c2506b3d0b18397ef1443fb18c0d893d6 (patch)
tree893862078b9045fbfb73296a0290d16f245b2c2c /IRCSharp.Tests/State/Motd.cs
parentb8e2634193eef0b7a4db417144fe7f38a5140c3b (diff)
Move tests to a separate project
Diffstat (limited to 'IRCSharp.Tests/State/Motd.cs')
-rw-r--r--IRCSharp.Tests/State/Motd.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/IRCSharp.Tests/State/Motd.cs b/IRCSharp.Tests/State/Motd.cs
new file mode 100644
index 0000000..2d75982
--- /dev/null
+++ b/IRCSharp.Tests/State/Motd.cs
@@ -0,0 +1,23 @@
+using System.Collections.Generic;
+using IRCTokens;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace IRCStates.Tests
+{
+    [TestClass]
+    public class Motd
+    {
+        [TestMethod]
+        public void MessageOfTheDay()
+        {
+            var server = new Server("test");
+            server.Parse(new Line("001 nickname"));
+            server.Parse(new Line("375 * :start of motd"));
+            server.Parse(new Line("372 * :first line of motd"));
+            server.Parse(new Line("372 * :second line of motd"));
+
+            CollectionAssert.AreEqual(new List<string> {"start of motd", "first line of motd", "second line of motd"},
+                server.Motd);
+        }
+    }
+}