public void ConstructorTest()
        {
            Mock <IIrcWriter> writer  = new Mock <IIrcWriter>(MockBehavior.Strict);
            const string      user    = "******";
            const string      channel = "channel";
            const string      message = "My Message";
            Regex             regex   = new Regex(".+");

            System.Text.RegularExpressions.Match match = regex.Match("something");

            CtcpPingHandlerArgs uut = new CtcpPingHandlerArgs(
                writer.Object,
                user,
                channel,
                message,
                regex,
                match
                );

            Assert.AreSame(writer.Object, uut.Writer);
            Assert.AreEqual(user, uut.User);
            Assert.AreEqual(channel, uut.Channel);
            Assert.AreEqual(message, uut.Message);
            Assert.AreSame(regex, uut.Regex);
            Assert.AreSame(match, uut.Match);
        }
Example #2
0
 private void HandlerCtcpPingHandler(CtcpPingHandlerArgs args)
 {
     args.Writer.SendCtcpPong(
         args.Message,
         args.Channel
         );
 }
Example #3
0
 public void TestSetup()
 {
     this.ircConfig        = TestHelpers.GetTestIrcConfig();
     this.ircWriter        = new Mock <IIrcWriter>(MockBehavior.Strict);
     this.responseReceived = null;
 }
Example #4
0
 private void MessageFunction(CtcpPingHandlerArgs args)
 {
     Assert.AreSame(this.ircWriter.Object, args.Writer);
     this.responseReceived = args;
 }