public void BlankHeaderErrors() { SlackTo slackTo = this.GetComponent("Header", this.SetupOkHandler()); Routable routable = new Routable(new Dictionary <string, string>(), "This is a slack message"); slackTo.Process(routable); Assert.NotNull(routable.Error); }
public void SendMessageInError() { SlackTo slackTo = this.GetComponent("Body", this.SetupErrorHandler()); Routable routable = new Routable(new Dictionary <string, string>(), "This is a slack message"); slackTo.Process(routable); Assert.NotNull(routable.Error); }
public void LoggingIsTriggered() { bool callbackMade = false; SlackTo slackTo = this.GetComponent("Body", this.SetupOkHandler()); Routable routable = new Routable(new Dictionary <string, string>(), "This is a slack message"); slackTo.OnLog += delegate(object sender, Log log) { callbackMade = true; }; slackTo.Process(routable); Assert.IsTrue(callbackMade); }
public void CanSendMessageFromHeader() { Dictionary <string, string> headers = new Dictionary <string, string>() { { "SlackMessage", "test" } }; SlackTo slackTo = this.GetComponent("Header", this.SetupOkHandler()); Routable routable = new Routable(headers, "This is a slack message"); slackTo.Process(routable); Assert.IsNull(routable.Error); }