public void InitializeTarget_IncorrectWebHookUrl_ShouldThrowException() { var slackTarget = new TestableSlackTarget { WebHookUrl = "IM A BIG FAT PHONY" }; Assert.Throws <ArgumentOutOfRangeException>(() => slackTarget.Initialize()); }
public void InitializeTarget_IncorrectChannel_ExtraCharWithHash_ShouldThrowException() { var slackTarget = new TestableSlackTarget { WebHookUrl = "http://slack.is.awesome.com", Channel = "w#log" }; Assert.Throws <ArgumentOutOfRangeException>(() => slackTarget.Initialize()); }
public void InitializeTarget_CorrectChannelWithVariable_TargetShouldInitialize() { var slackTarget = new TestableSlackTarget { WebHookUrl = "http://slack.is.awesome.com", Channel = "@slackbot" }; slackTarget.Initialize(); }
public void InitializeTarget_EmptyWebHookUrl_ShouldThrowException() { var slackTarget = new TestableSlackTarget(); Assert.Throws <ArgumentOutOfRangeException>(() => slackTarget.Initialize()); }