コード例 #1
0
ファイル: CoffeeServiceTest.cs プロジェクト: XBlackBunny/Doug
        public void GivenOneReady_AndGivenOneNotready_WhenReminding_SendOneOverTwoRemind()
        {
            _coffeeRepository.Setup(repo => repo.GetMissingParticipants()).Returns(new List <string>()
            {
                "bob"
            });
            _coffeeRepository.Setup(repo => repo.GetReadyParticipants()).Returns(new List <string>()
            {
                "robert"
            });

            _coffeeService.CoffeeRemind(Channel);

            _slack.Verify(slack => slack.SendMessage("*1/2* - <@bob> ", Channel));
        }
コード例 #2
0
        public void GivenOneReady_AndGivenOneNotReady_WhenReminding_SendOneOverTwoRemind()
        {
            _userService.Setup(service => service.Mention(It.IsAny <User>())).Returns("<@bob>");
            _coffeeRepository.Setup(repo => repo.GetMissingParticipants()).Returns(new List <User> {
                new User()
            });
            _coffeeRepository.Setup(repo => repo.GetReadyParticipants()).Returns(new List <User> {
                new User {
                    Id = "robert"
                }
            });

            _coffeeService.CoffeeRemind(Channel);

            _slack.Verify(slack => slack.BroadcastMessage("*1/2* - <@bob> ", Channel));
        }