Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void validateSuccess()
        public virtual void ValidateSuccess()
        {
            // when
            Config config = Config.fromSettings(stringMap(EnterpriseEditionSettings.mode.name(), Mode.name(), ClusterSettings.server_id.name(), "1", ClusterSettings.initial_hosts.name(), "localhost,remotehost")).withValidator(new HaConfigurationValidator()).build();

            // then
            assertEquals(asList(new HostnamePort("localhost"), new HostnamePort("remotehost")), config.Get(ClusterSettings.initial_hosts));
            assertEquals(new InstanceId(1), config.Get(ClusterSettings.server_id));
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void missingBoltConnector()
        public virtual void MissingBoltConnector()
        {
            // then
            Expected.expect(typeof(InvalidSettingException));
            Expected.expectMessage("A Bolt connector must be configured to run a cluster");

            // when
            Config.builder().withSetting(EnterpriseEditionSettings.mode.name(), Mode.name()).withSetting(initial_discovery_members, "").withSetting(initial_discovery_members.name(), "localhost:99,remotehost:2").withValidator(new CausalClusterConfigurationValidator()).build();
        }