public void ChildTeller_TellMessageWithNullChildWaiterAndTestKitBaseAndRecipientAndMessage_ThrowsArgumentNullException()
        {
            //arrange
            ChildTeller sut = CreateChildTeller();

            //act
            Action act = () => sut.TellMessage <object>(null, null, null, null, ExpectedChildrenCount, Sender);

            //assert
            act.ShouldThrow <ArgumentNullException>();
        }
        public void ChildTeller_TellMessageWithNullRecipient_ThrowsArgumentNullException()
        {
            //arrange
            ChildTeller sut = CreateChildTeller();

            //act
            Action act = () => sut.TellMessage(ChildWaiter, this, null, Message, ExpectedChildrenCount, Sender);

            //assert
            act.ShouldThrow <ArgumentNullException>();
        }
        public void ChildTeller_TellMessageWithNoSender_WaitsForChildrenAfterTellingRecipient()
        {
            //arrange
            ChildTeller sut = CreateChildTeller();

            //act
            sut.TellMessage(ChildWaiter, this, Recipient, Message, ExpectedChildrenCount);

            //assert
            CallOrder.Should().ContainInOrder(nameof(IActorRef.Tell), nameof(IChildWaiter.Wait));
        }
        public void ChildTeller_TellMessage_StartsWaitingForChildrenBeforeTellingRecipient()
        {
            //arrange
            ChildTeller sut = CreateChildTeller();

            //act
            sut.TellMessage(ChildWaiter, this, Recipient, Message, ExpectedChildrenCount, Sender);

            //assert
            CallOrder.Should().ContainInOrder(nameof(IChildWaiter.Start), nameof(IActorRef.Tell) + "Sender");
        }
        public void ChildTeller_TellMessageWithNoSender_TellsRecipient()
        {
            //arrange
            ChildTeller sut = CreateChildTeller();

            //act
            sut.TellMessage(ChildWaiter, this, Recipient, Message, ExpectedChildrenCount);

            //assert
            RecipientMock.Verify(actorRef => actorRef.Tell(Message, TestActor));
        }
        public void ChildTeller_TellMessageWithNoSender_StartsWaitingForChildren()
        {
            //arrange
            ChildTeller sut = CreateChildTeller();

            //act
            sut.TellMessage(ChildWaiter, this, Recipient, Message, ExpectedChildrenCount);

            //assert
            ChildWaiterMock.Verify(
                waiter => waiter.Start(this, ExpectedChildrenCount),
                Times.Once);
        }
        public void ChildTeller_TellMessage_WaitsForChildren()
        {
            //arrange
            ChildTeller sut = CreateChildTeller();

            //act
            sut.TellMessage(ChildWaiter, this, Recipient, Message, ExpectedChildrenCount, Sender);

            //assert
            ChildWaiterMock.Verify(
                waiter => waiter.Wait(),
                Times.Once);
        }