public TestActorRef <TActor> Create <TActor>(IWaiter childWaiter, TestKitBase testKit, Props props, int expectedChildrenCount, IActorRef supervisor) where TActor : ActorBase { childWaiter.Start(testKit, expectedChildrenCount); TestActorRef <TActor> sut = supervisor != null ? testKit.ActorOfAsTestActorRef <TActor>(props, supervisor) : testKit.ActorOfAsTestActorRef <TActor>(props); childWaiter.Wait(); return(sut); }
public void TellMessage <TMessage>(IWaiter waiter, TestKitBase testKit, IActorRef recipient, TMessage message, int waitForCount, IActorRef sender = null) { waiter.Start(testKit, waitForCount); if (sender == null) { recipient.Tell(message); } else { recipient.Tell(message, sender); } waiter.Wait(); }