Exemplo n.º 1
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());
        }
Exemplo n.º 2
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));
        }
Exemplo n.º 3
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);
        }