예제 #1
0
        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);
        }
예제 #2
0
 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();
 }