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)); }
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()); }
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)); }
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); }