2020-05-06 06:04:00 +00:00
|
|
|
|
using System.Collections.Generic;
|
2022-03-25 19:11:48 +00:00
|
|
|
|
using IRCStates;
|
2020-05-15 03:06:10 +00:00
|
|
|
|
using IRCTokens;
|
2020-05-06 06:04:00 +00:00
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
2020-04-22 20:28:51 +00:00
|
|
|
|
|
2022-03-25 19:11:48 +00:00
|
|
|
|
namespace IRCSharp.Tests.State
|
2020-04-22 20:28:51 +00:00
|
|
|
|
{
|
|
|
|
|
[TestClass]
|
|
|
|
|
public class Motd
|
|
|
|
|
{
|
2020-05-06 06:04:00 +00:00
|
|
|
|
[TestMethod]
|
|
|
|
|
public void MessageOfTheDay()
|
|
|
|
|
{
|
|
|
|
|
var server = new Server("test");
|
2020-05-13 18:20:47 +00:00
|
|
|
|
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"));
|
2020-05-06 06:04:00 +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
|
|
|
|
}
|
|
|
|
|
}
|