Example #1
0
        public void Should_notify_management_when_case_is_escalated()
        {
            SupportCase             = SupportCaseProcessor.InitiateSupportCase("Make the corners rounded.");
            SupportCase.IsEscalated = true;

            SupportCaseProcessor.Process(SupportCase);

            MessagingService.AssertWasCalled(m => m.EscalateToManagement(SupportCase));
        }
Example #2
0
        public void Multiple_calls_without_caring_about_args()
        {
            SupportCase = SupportCaseProcessor.InitiateSupportCase("Make the corners rounded.");

            SupportCaseProcessor.Process(SupportCase);

            MessagingService.AssertWasCalled(m => m.Lock(Arg <bool> .Is.Anything), options => options.Repeat.Twice());
        }
Example #3
0
        public void Multiple_calls_with_distinct_args_in_any_order()
        {
            SupportCase = SupportCaseProcessor.InitiateSupportCase("Make the corners rounded.");

            SupportCaseProcessor.Process(SupportCase);

            //They're actually called in the other order, m.Lock(true) coming first.
            MessagingService.AssertWasCalled(m => m.Lock(false));
            MessagingService.AssertWasCalled(m => m.Lock(true));
        }
Example #4
0
        public void Multiple_calls_with_distinct_args_in_specific_order()
        {
            SupportCase = SupportCaseProcessor.InitiateSupportCase("Make the corners rounded.");

            SupportCaseProcessor.Process(SupportCase);

            IList <object[]> args = MessagingService.GetArgumentsForCallsMadeOn(m => m.Lock(Arg <bool> .Is.Anything));

            Assert.That(args[0][0], Is.True);
            Assert.That(args[1][0], Is.False);
        }