//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldOpenBoltPort() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldOpenBoltPort() { // given using (ServerControls controls = GetTestServerBuilder(TestDir.directory()).newServer()) { URI uri = controls.BoltURI(); // when (new SocketConnection()).connect(new HostnamePort(uri.Host, uri.Port)); // then no exception } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldReturnBoltUriWhenDefaultBoltConnectorOffAndOtherConnectorConfigured() public virtual void ShouldReturnBoltUriWhenDefaultBoltConnectorOffAndOtherConnectorConfigured() { TestServerBuilder serverBuilder = newInProcessBuilder(TestDir.directory()).withConfig("dbms.connector.bolt.enabled", "false").withConfig("dbms.connector.another_bolt.type", "BOLT").withConfig("dbms.connector.another_bolt.enabled", "true").withConfig("dbms.connector.another_bolt.listen_address", ":0"); using (ServerControls server = serverBuilder.NewServer()) { HostnamePort boltHostPort = connectorAddress(server.Graph(), "bolt"); HostnamePort anotherBoltHostPort = connectorAddress(server.Graph(), "another_bolt"); assertNull(boltHostPort); assertNotNull(anotherBoltHostPort); URI boltUri = server.BoltURI(); assertEquals("bolt", boltUri.Scheme); assertEquals(anotherBoltHostPort.Host, boltUri.Host); assertEquals(anotherBoltHostPort.Port, boltUri.Port); } }