Example #1
0
            public void SetUp()
            {
                _slackGatewaySpy = new SlackGatewaySpy();
                _clock           = new ClockStub(
                    new DateTimeOffset(
                        new DateTime(2019, 03, 01, 10, 30, 0)
                        )
                    );

                _getBillablePeople = new GetBillablePeople(_slackGatewaySpy, _clock);

                _slackGatewayStub = new SlackGatewayStub
                {
                    BillablePeople = new[]
                    {
                        new SlackBillablePerson
                        {
                            Email = "*****@*****.**",
                            Id    = "U8723"
                        },
                        new SlackBillablePerson
                        {
                            Email = "*****@*****.**",
                            Id    = "U9999"
                        },
                        new SlackBillablePerson
                        {
                            Email = "*****@*****.**",
                            Id    = "U9998"
                        }
                    }
                };

                _getBillablePeopleWithExclusions = new GetBillablePeople(_slackGatewayStub, _clock);
            }
Example #2
0
        public void CanRemindBillablePerson()
        {
            var spy = new SlackGatewaySpy();
            var remindBillablePerson = new SendReminder(spy);

            remindBillablePerson.Execute(new SendReminderRequest
            {
                Channel = "U120123D",
                Text    = Text
            });

            spy.Message.Channel.Should().Be("U120123D");
        }
Example #3
0
 public void SetUp()
 {
     _slackGatewaySpy = new SlackGatewaySpy();
 }