TcpClientTransport implements ClientTransport { public static TcpClientTransport create(int port) { TcpClient tcpClient = TcpClient.create().port(port); return create(tcpClient); } private  TcpClientTransport(TcpClient client, int maxFrameLength); static TcpClientTransport create(int port); static TcpClientTransport create(String bindAddress, int port); static TcpClientTransport create(InetSocketAddress address); static TcpClientTransport create(TcpClient client); static TcpClientTransport create(TcpClient client, int maxFrameLength); @Override int maxFrameLength(); @Override Mono<DuplexConnection> connect();  }
@DisplayName("creates client with BindAddress") @Test void createBindAddress() { assertThat(TcpClientTransport.create("test-bind-address", 8000)).isNotNull(); }
@DisplayName("creates client with InetSocketAddress") @Test void createInetSocketAddress() { assertThat( TcpClientTransport.create( InetSocketAddress.createUnresolved("test-bind-address", 8000))) .isNotNull(); }
@DisplayName("create throws NullPointerException with null bindAddress") @Test void createNullBindAddress() { assertThatNullPointerException() .isThrownBy(() -> TcpClientTransport.create((String) null, 8000)) .withMessage("bindAddress must not be null"); }
@DisplayName("create throws NullPointerException with null address") @Test void createNullInetSocketAddress() { assertThatNullPointerException() .isThrownBy(() -> TcpClientTransport.create((InetSocketAddress) null)) .withMessage("address must not be null"); }
@DisplayName("create throws NullPointerException with null client") @Test void createNullTcpClient() { assertThatNullPointerException() .isThrownBy(() -> TcpClientTransport.create((TcpClient) null)) .withMessage("client must not be null"); }
@DisplayName("creates client with port") @Test void createPort() { assertThat(TcpClientTransport.create(8000)).isNotNull(); }
@DisplayName("creates client with TcpClient") @Test void createTcpClient() { assertThat(TcpClientTransport.create(TcpClient.create())).isNotNull(); }