public void Given_a_Mailbox_with_no_actor_When_calling_ScheduleIfNeeded_Then_it_should_not_schedule() { var mailbox = new TestMailbox(); mailbox.CallScheduleIfNeeded(); mailbox.NumberOfScheduleCalls.Should().Be(0); }
public void Given_a_Mailbox_that_has_not_yet_been_scheduled_When_calling_ScheduleIfNeeded_Then_a_new_Schedule_is_not_performed() { var mailbox = new TestMailbox(); mailbox.SetActor(A.Dummy <InternalActorRef>()); var scheduleCallsBefore = mailbox.NumberOfScheduleCalls; mailbox.CallScheduleIfNeeded(); mailbox.NumberOfScheduleCalls.Should().Be(scheduleCallsBefore); }