about summary refs log tree commit diff
path: root/IrcStates/Tests/Motd.cs
blob: 92929a5434b0e9fa231a16919251a624adb0a720 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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.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"));

            CollectionAssert.AreEqual(new List<string> {"start of motd", "first line of motd", "second line of motd"},
                server.Motd);
        }
    }
}