public void DistributedPubSubMediator_with_Consistent_Hash_router_not_be_allowed_constructed_by_settings()
        {
            Intercept <ArgumentException>(() =>
            {
                var config =
                    DistributedPubSubMediatorRouterConfig.GetConfig("random")
                    .WithFallback(Sys.Settings.Config)
                    .GetConfig("akka.cluster.pub-sub");

                DistributedPubSubSettings.Create(config).WithRoutingLogic(new ConsistentHashingRoutingLogic(Sys));
            });
        }
        public void DistributedPubSubSettings_must_have_default_config()
        {
            var distributedPubSubSettings = DistributedPubSubSettings.Create(Sys);

            distributedPubSubSettings.ShouldNotBe(null);
            distributedPubSubSettings.Role.ShouldBe(null);
            distributedPubSubSettings.RoutingLogic.GetType().ShouldBe(typeof(RandomLogic));
            distributedPubSubSettings.GossipInterval.TotalSeconds.ShouldBe(1);
            distributedPubSubSettings.RemovedTimeToLive.TotalSeconds.ShouldBe(120);
            distributedPubSubSettings.MaxDeltaElements.ShouldBe(3000);

            var config = Sys.Settings.Config.GetConfig("akka.cluster.pub-sub");

            config.GetString("name").ShouldBe("distributedPubSubMediator");
            config.GetString("use-dispatcher").ShouldBe(string.Empty);
        }