示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldExposeBoltRoutingIfCore() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldExposeBoltRoutingIfCore()
        {
            // Given
            BoltConnector bolt   = new BoltConnector("honestJakesBoltConnector");
            Config        config = Config.builder().withSetting(EnterpriseEditionSettings.mode, EnterpriseEditionSettings.Mode.CORE.name()).withSetting(bolt.Enabled, "true").withSetting(bolt.Type, BoltConnector.ConnectorType.BOLT.name()).build();

            // When
            IDictionary <string, object> asd = ToMap(EnterpriseDiscoverableURIs.EnterpriseDiscoverableURIsConflict(config, new ConnectorPortRegister()));

            // Then
            assertThat(asd["bolt_routing"], equalTo("bolt+routing://localhost:7687"));
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldGrabPortFromRegisterIfSetTo0() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldGrabPortFromRegisterIfSetTo0()
        {
            // Given
            BoltConnector         bolt   = new BoltConnector("honestJakesBoltConnector");
            Config                config = Config.builder().withSetting(EnterpriseEditionSettings.mode, EnterpriseEditionSettings.Mode.CORE.name()).withSetting(bolt.Enabled, "true").withSetting(bolt.Type, BoltConnector.ConnectorType.BOLT.name()).withSetting(bolt.ListenAddress, ":0").build();
            ConnectorPortRegister ports  = new ConnectorPortRegister();

            ports.Register(bolt.Key(), new InetSocketAddress(1337));

            // When
            IDictionary <string, object> asd = ToMap(EnterpriseDiscoverableURIs.EnterpriseDiscoverableURIsConflict(config, ports));

            // Then
            assertThat(asd["bolt_routing"], equalTo("bolt+routing://localhost:1337"));
        }