IRC parsing, tokenization, and state handling in C#
1namespace IRCSharp.Tests.State;
2
3[TestClass]
4public class Motd
5{
6 [TestMethod]
7 public void MessageOfTheDay()
8 {
9 var server = new Server("test");
10 server.Parse(new("001 nickname"));
11 server.Parse(new("375 * :start of motd"));
12 server.Parse(new("372 * :first line of motd"));
13 server.Parse(new("372 * :second line of motd"));
14
15 CollectionAssert.AreEqual(new List<string> {"start of motd", "first line of motd", "second line of motd"},
16 server.Motd);
17 }
18}