Akka.Remote.Tests.RemoteRouterSpec.RemoteRouter_must_deploy_its_children_on_remote_host_driven_by_programmatic_definition C# (CSharp) Method

RemoteRouter_must_deploy_its_children_on_remote_host_driven_by_programmatic_definition() private method

        public void RemoteRouter_must_deploy_its_children_on_remote_host_driven_by_programmatic_definition()
        {
            var probe = CreateTestProbe(masterActorSystem);
            var router = masterActorSystem.ActorOf(new RemoteRouterConfig(new RoundRobinPool(2), new[] { new Address("akka.tcp", sysName, "127.0.0.1", port) })
                .Props(Props.Create<Echo>()), "blub2");
            var replies = new HashSet<ActorPath>();
            for (var i = 0; i < 5; i++)
            {
                router.Tell("", probe.Ref);
                var expected = probe.ExpectMsg<IActorRef>(GetTimeoutOrDefault(null));
                replies.Add(expected.Path);
            }

            Assert.Equal(2, replies.Count);
            Assert.Equal(1, replies.Select(x => x.Parent).Distinct().Count());
            Assert.True(replies.All(x => x.Address.Equals(intendedRemoteAddress)));
            masterActorSystem.Stop(router);
        }