public void CcTestChannelDoesNotExist() { string dummyChannel = "#dumb"; string message = "My Message!"; string expectedMessage = string.Format( "@{0}: I am not in {1}, sorry :(", remoteUser, dummyChannel ); this.mockWriter.Setup( w => w.SendMessage(expectedMessage, this.ircConfig.Channels[0]) ); IIrcHandler ccHandler = this.uut.GetHandlers()[1]; HandlerArgs args = this.GetHandlerArgs( "!cc <" + dummyChannel + "> " + message, this.ircConfig.Channels[0] ); ccHandler.HandleEvent(args); this.mockWriter.VerifyAll(); }
public void BadBCastCommandTest() { string message = "My Message!"; IIrcHandler bcastHandler = this.uut.GetHandlers()[0]; HandlerArgs args = this.GetHandlerArgs(" !broadcast " + message, this.ircConfig.Channels[0]); bcastHandler.HandleEvent(args); this.mockWriter.VerifyAll(); }
public void BadCcCommandTest() { string message = "My Message!"; IIrcHandler ccHandler = this.uut.GetHandlers()[1]; HandlerArgs args = this.GetHandlerArgs( " !cc <" + this.ircConfig.Channels[1] + "> " + message, // Note the whitespace. this.ircConfig.Channels[0] ); ccHandler.HandleEvent(args); this.mockWriter.VerifyAll(); }
public void BCastTest() { string message = "My Message!"; string expectedMessage = this.GetExpectedString(message, this.ircConfig.Channels[0]); this.mockWriter.Setup( w => w.SendBroadcastMessage(expectedMessage) ); IIrcHandler bcastHandler = this.uut.GetHandlers()[0]; HandlerArgs args = this.GetHandlerArgs("!broadcast " + message, this.ircConfig.Channels[0]); bcastHandler.HandleEvent(args); this.mockWriter.VerifyAll(); }
public void CcTest() { string message = "My Message!"; string expectedMessage = this.GetExpectedString(message, this.ircConfig.Channels[0]); this.mockWriter.Setup( w => w.SendMessage(expectedMessage, this.ircConfig.Channels[1]) ); IIrcHandler ccHandler = this.uut.GetHandlers()[1]; HandlerArgs args = this.GetHandlerArgs( "!cc <" + this.ircConfig.Channels[1] + "> " + message, this.ircConfig.Channels[0] ); ccHandler.HandleEvent(args); this.mockWriter.VerifyAll(); }