Exemplo n.º 1
0
        public void InitializeTarget_IncorrectWebHookUrl_ShouldThrowException()
        {
            var slackTarget = new TestableSlackTarget
            {
                WebHookUrl = "IM A BIG FAT PHONY"
            };

            Assert.Throws <ArgumentOutOfRangeException>(() => slackTarget.Initialize());
        }
Exemplo n.º 2
0
        public void InitializeTarget_IncorrectChannel_ExtraCharWithHash_ShouldThrowException()
        {
            var slackTarget = new TestableSlackTarget
            {
                WebHookUrl = "http://slack.is.awesome.com",
                Channel    = "w#log"
            };

            Assert.Throws <ArgumentOutOfRangeException>(() => slackTarget.Initialize());
        }
Exemplo n.º 3
0
        public void InitializeTarget_CorrectChannelWithVariable_TargetShouldInitialize()
        {
            var slackTarget = new TestableSlackTarget
            {
                WebHookUrl = "http://slack.is.awesome.com",
                Channel    = "@slackbot"
            };

            slackTarget.Initialize();
        }
Exemplo n.º 4
0
        public void InitializeTarget_EmptyWebHookUrl_ShouldThrowException()
        {
            var slackTarget = new TestableSlackTarget();

            Assert.Throws <ArgumentOutOfRangeException>(() => slackTarget.Initialize());
        }