public void TestNamesAddedToChannelNames() { var namesListHandler = new NamesListHandler(); var msg = new MsgEventArgs { Command = "353", Data = new[] { "", "", "test", "hello world" } }; Caller.namesList = new Action <NamesListAction>(r => { }); namesListHandler.Msg(Talker, Caller, msg); //CollectionAssert.AreEqual(new[] {"hello", "world"}, Talker.GetChat("test").Users.ToArray()); }
public void TestNamesList() { var namesListHandler = new NamesListHandler(); var msg = new MsgEventArgs { Command = "353", Data = new[] { "", "", "test", "hello world" } }; var visited = false; Caller.namesList = new Action <NamesListAction>(res => { Assert.AreEqual("test", res.ChatNames.First()); //Assert.AreEqual("hello", res.Names[0]); //Assert.AreEqual("world", res.Names[1]); visited = true; }); namesListHandler.Msg(Talker, Caller, msg); Assert.IsTrue(visited); }
public void TestOnlyTriggerOnNamesList() { var namesListHandler = new NamesListHandler(); Assert.AreEqual("353", namesListHandler.ForCommand()); }