Пример #1
0
        public void VersionParseTest()
        {
            var parser = new XG.Plugin.Irc.Parser.Types.Dcc.Version();
            EventArgs<Channel, string, string> raisedEvent = null;
            parser.OnXdccList += (sender, e) => raisedEvent = e;
            string aExpectedCommand = "XDCC HELP";

            raisedEvent = null;
            Parse(parser, "\u0001VERSION *** Iroffer v2.0 Creato Da ArSeNiO ***");

            Assert.AreEqual(Channel, raisedEvent.Value1);
            Assert.AreEqual(Bot.Name, raisedEvent.Value2);
            Assert.AreEqual(aExpectedCommand, raisedEvent.Value3);
        }
Пример #2
0
        public void VersionParseTest()
        {
            var parser = new XG.Plugin.Irc.Parser.Types.Dcc.Version();
            EventArgs <Channel, string, string> raisedEvent = null;

            parser.OnXdccList += (sender, e) => raisedEvent = e;
            string aExpectedCommand = "XDCC HELP";

            raisedEvent = null;
            Parse(parser, "\u0001VERSION *** Iroffer v2.0 Creato Da ArSeNiO ***");

            Assert.AreEqual(Channel, raisedEvent.Value1);
            Assert.AreEqual(Bot.Name, raisedEvent.Value2);
            Assert.AreEqual(aExpectedCommand, raisedEvent.Value3);
        }
Пример #3
0
        public void VersionParseTest()
        {
            var parser = new XG.Plugin.Irc.Parser.Types.Dcc.Version();
            EventArgs<XG.Model.Domain.Server, string, string> raisedEvent = null;
            parser.OnXdccList += (sender, e) => raisedEvent = e;
            string aExpectedCommand = "XDCC HELP";

            raisedEvent = null;
            Parse(parser, Connection, CreateIrcEventArgs(Channel.Name, Bot.Name, "\u0001VERSION *** Iroffer v2.0 Creato Da ArSeNiO ***", ReceiveType.QueryNotice));

            Assert.AreEqual(Server, raisedEvent.Value1);
            Assert.AreEqual(Bot.Name, raisedEvent.Value2);
            Assert.AreEqual(aExpectedCommand, raisedEvent.Value3);

            raisedEvent = null;
            Parse(parser, Connection, CreateCtcpEventArgs(Channel.Name, Bot.Name, "*** iroffer v2.0 Creato Da ArSeNiO ***", ReceiveType.CtcpReply, Rfc2812.Version()));
            parser.OnXdccList += (sender, e) => raisedEvent = e;

            Assert.AreEqual(Server, raisedEvent.Value1);
            Assert.AreEqual(Bot.Name, raisedEvent.Value2);
            Assert.AreEqual(aExpectedCommand, raisedEvent.Value3);
        }