예제 #1
0
        public void MockClientReturnsFalse()
        {
            var client = new MockSlackClient(false);
            var result = client.Post(new SlackMessage());

            Assert.IsFalse(result);
        }
 public void MockClientCallsCallback()
 {
     var result = false;
     var client = new MockSlackClient(x => result = true);
     client.Post(new SlackMessage());
     Assert.IsTrue(result);
 }
예제 #3
0
        public void MockClientCallsCallback()
        {
            var result = false;
            var client = new MockSlackClient(x => result = true);

            client.Post(new SlackMessage());
            Assert.IsTrue(result);
        }
예제 #4
0
        public void MockClientThrowsException()
        {
            var client = new MockSlackClient(x => { throw new MockClientException(); });

            client.Post(new SlackMessage());
        }
 public void MockClientThrowsException()
 {
     var client = new MockSlackClient(x => { throw new MockClientException(); });
     client.Post(new SlackMessage());
 }
 public void MockClientReturnsTrue()
 {
     var client = new MockSlackClient(true);
     var result = client.Post(new SlackMessage());
     Assert.IsTrue(result);
 }