about summary refs log blame commit diff
path: root/IrcStates/Tests/Motd.cs
blob: 403fa78b1e3306ab00ad3c56a245dc2555d82a2b (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                   





                         











                                                                                                                      

     
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.ParseTokens(new Line("001 nickname"));
            server.ParseTokens(new Line("375 * :start of motd"));
            server.ParseTokens(new Line("372 * :first line of motd"));
            server.ParseTokens(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);
        }
    }
}