//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldNotCloseUnderlyingChannelWhenItIsClosed() internal virtual void ShouldNotCloseUnderlyingChannelWhenItIsClosed() { Channel channel = ChannelMock(false); BoltChannel boltChannel = new BoltChannel("bolt-1", "bolt", channel); boltChannel.Close(); verify(channel, never()).close(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldCloseUnderlyingChannelWhenItIsOpen() internal virtual void ShouldCloseUnderlyingChannelWhenItIsOpen() { Channel channel = ChannelMock(true); BoltChannel boltChannel = new BoltChannel("bolt-1", "bolt", channel); boltChannel.Close(); verify(channel).close(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHaveUsernameAndUserAgent() internal virtual void ShouldHaveUsernameAndUserAgent() { BoltChannel boltChannel = new BoltChannel("bolt-1", "my-bolt", _channel); assertNull(boltChannel.Username()); boltChannel.UpdateUser("hello", "my-bolt-driver/1.2.3"); assertEquals("hello", boltChannel.Username()); assertEquals("my-bolt-driver/1.2.3", boltChannel.UserAgent()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test @SuppressWarnings("deprecation") void shouldExposeClientConnectionInfo() internal virtual void ShouldExposeClientConnectionInfo() { EmbeddedChannel channel = new EmbeddedChannel(); BoltChannel boltChannel = new BoltChannel("bolt-42", "my-bolt", channel); ClientConnectionInfo info1 = boltChannel.Info(); assertEquals("bolt-42", info1.ConnectionId()); assertEquals("bolt", info1.Protocol()); assertEquals(SocketAddress.format(channel.remoteAddress()), info1.ClientAddress()); boltChannel.UpdateUser("Tom", "my-driver"); ClientConnectionInfo info2 = boltChannel.Info(); assertEquals("bolt-42", info2.ConnectionId()); assertEquals("bolt", info2.Protocol()); assertEquals(SocketAddress.format(channel.remoteAddress()), info2.ClientAddress()); assertThat(info2.AsConnectionDetails(), containsString("Tom")); assertThat(info2.AsConnectionDetails(), containsString("my-driver")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHaveConnectTime() internal virtual void ShouldHaveConnectTime() { BoltChannel boltChannel = new BoltChannel("bolt-1", "my-bolt", _channel); assertThat(boltChannel.ConnectTime(), greaterThan(0L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHaveConnector() internal virtual void ShouldHaveConnector() { BoltChannel boltChannel = new BoltChannel("bolt-1", "my-bolt", _channel); assertEquals("my-bolt", boltChannel.Connector()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldHaveId() internal virtual void ShouldHaveId() { BoltChannel boltChannel = new BoltChannel("bolt-42", "bolt", _channel); assertEquals("bolt-42", boltChannel.Id()); }