about summary refs log tree commit diff
path: root/IRCStates/Tests/Motd.cs
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2020-05-14 23:06:10 -0400
committerBen Harris <ben@tilde.team>2020-05-14 23:17:47 -0400
commit21f1e95fb8e935134a969bc3d729964d8d2aadfa (patch)
treedb2be27e9b5ac48e19f92b56cbad68ab59f7099e /IRCStates/Tests/Motd.cs
parent304df7805b9925c2edd992fd4177eef80197f807 (diff)
rename Irc to IRC
Diffstat (limited to 'IRCStates/Tests/Motd.cs')
-rw-r--r--IRCStates/Tests/Motd.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/IRCStates/Tests/Motd.cs b/IRCStates/Tests/Motd.cs
new file mode 100644
index 0000000..2d75982
--- /dev/null
+++ b/IRCStates/Tests/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);
+        }
+    }
+}