Akka.Tests.Routing.RandomSpec.Random_must_be_able_to_shut_down_its_instance C# (CSharp) Метод

Random_must_be_able_to_shut_down_its_instance() приватный Метод

private Random_must_be_able_to_shut_down_its_instance ( ) : void
Результат void
        public void Random_must_be_able_to_shut_down_its_instance()
        {
            const int routeeCount = 7;
            var testLatch = new TestLatch(routeeCount);
            var router = Sys.ActorOf(new RandomPool(routeeCount).Props(Props.Create(() => new HelloWorldActor(testLatch))));
            router.Tell("hello", TestActor);
            router.Tell("hello", TestActor);
            router.Tell("hello", TestActor);
            router.Tell("hello", TestActor);
            router.Tell("hello", TestActor);

            Within(TimeSpan.FromSeconds(2), () => {
                ExpectMsg("world");
                ExpectMsg("world");
                ExpectMsg("world");
                ExpectMsg("world");
                ExpectMsg("world");
                return true;
            });
            
            Sys.Stop(router);
            testLatch.Ready(TimeSpan.FromSeconds(5));
        }
    }