public void TestCapCommandMessage() { Assert.Equal(new Message { Tags = null, Source = null, Verb = "CAP", Parameters = new string[] { "REQ", "sasl" } }, MessageTextParser.Parse("CAP REQ :sasl")); }
public void TestTagsFromPrivmsg() { Assert.Equal( new[] { new Tag { Key = "id", Value = "234AB" }, }, MessageTextParser.Parse("@id=234AB :dan!d@localhost PRIVMSG #chan :Hey what's up!").Tags ); }
public void TestUserMaskParsingFromPrivmsg() { Assert.Equal( new Fullhost { Nickname = "dan", Username = "******", Hostname = "localhost" }, FullhostTextParser.Parse(MessageTextParser.Parse("@id=234AB :dan!d@localhost PRIVMSG #chan :Hey what's up!").Source) ); }
public void TestPrivmsgMessage() { Assert.Equal(new Message { Tags = new Tag[] { new Tag { Key = "id", Value = "234AB" } }, Source = "dan!d@localhost", Verb = "PRIVMSG", Parameters = new string[] { "#chan", "Hey what's up!" } }, MessageTextParser.Parse("@id=234AB :dan!d@localhost PRIVMSG #chan :Hey what's up!")); }