2024-03-26 20:10:54 +00:00
|
|
|
|
namespace IRCSharp.Tests.State;
|
2020-04-22 20:28:51 +00:00
|
|
|
|
|
2024-03-26 20:10:54 +00:00
|
|
|
|
[TestClass]
|
|
|
|
|
public class Motd
|
2020-04-22 20:28:51 +00:00
|
|
|
|
{
|
2024-03-26 20:10:54 +00:00
|
|
|
|
[TestMethod]
|
|
|
|
|
public void MessageOfTheDay()
|
2020-04-22 20:28:51 +00:00
|
|
|
|
{
|
2024-03-26 20:10:54 +00:00
|
|
|
|
var server = new Server("test");
|
|
|
|
|
server.Parse(new("001 nickname"));
|
|
|
|
|
server.Parse(new("375 * :start of motd"));
|
|
|
|
|
server.Parse(new("372 * :first line of motd"));
|
|
|
|
|
server.Parse(new("372 * :second line of motd"));
|
2020-05-06 06:04:00 +00:00
|
|
|
|
|
2024-03-26 20:10:54 +00:00
|
|
|
|
CollectionAssert.AreEqual(new List<string> {"start of motd", "first line of motd", "second line of motd"},
|
|
|
|
|
server.Motd);
|
2020-04-22 20:28:51 +00:00
|
|
|
|
}
|
2024-03-26 20:10:54 +00:00
|
|
|
|
}
|