コード例 #1
0
        public void Given_a_Mailbox_When_setting_a_actor_Then_a_Schedule_is_performed()
        {
            var mailbox = new TestMailbox();

            mailbox.SetActor(A.Dummy <InternalActorRef>());
            mailbox.NumberOfScheduleCalls.Should().Be(1);
        }
コード例 #2
0
        private static TestMailbox CreateMailboxWithActor(InternalActorRef internalActorRef)
        {
            var mailbox = new TestMailbox();

            mailbox.SetActor(internalActorRef);
            mailbox.ProcessScheduledCalls();
            mailbox.Reset();
            return(mailbox);
        }
コード例 #3
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);
        }