IRC parsing, tokenization, and state handling in C#
at tunit 16 lines 509 B view raw
1namespace IRCSharp.Tests.State; 2 3public class Motd 4{ 5 [Test] 6 public async Task MessageOfTheDay() 7 { 8 var server = new Server("test"); 9 server.Parse(new Line("001 nickname")); 10 server.Parse(new Line("375 * :start of motd")); 11 server.Parse(new Line("372 * :first line of motd")); 12 server.Parse(new Line("372 * :second line of motd")); 13 14 await Assert.That(server.Motd).IsEquivalentTo(["start of motd", "first line of motd", "second line of motd"]); 15 } 16}