assertEquals(receiverBufferSize, options.getReceiveBufferSize()); assertEquals(reuseAddress, options.isReuseAddress()); assertEquals(trafficClass, options.getTrafficClass());
private void checkCopyHttpClientOptions(HttpClientOptions options, HttpClientOptions copy) { assertEquals(options.getSendBufferSize(), copy.getSendBufferSize()); assertEquals(options.getReceiveBufferSize(), copy.getReceiveBufferSize()); assertEquals(options.isReuseAddress(), copy.isReuseAddress()); assertEquals(options.getTrafficClass(), copy.getTrafficClass());
assertIllegalArgumentException(() -> options.setSendBufferSize(-123)); assertEquals(NetworkOptions.DEFAULT_RECEIVE_BUFFER_SIZE, options.getReceiveBufferSize()); rand = TestUtils.randomPositiveInt(); assertEquals(options, options.setReceiveBufferSize(rand)); assertEquals(rand, options.getReceiveBufferSize()); assertIllegalArgumentException(() -> options.setReceiveBufferSize(0)); assertIllegalArgumentException(() -> options.setReceiveBufferSize(-123));
assertEquals(receiverBufferSize, options.getReceiveBufferSize()); assertEquals(reuseAddress, options.isReuseAddress()); assertEquals(trafficClass, options.getTrafficClass());
private void checkCopyHttpClientOptions(HttpClientOptions options, HttpClientOptions copy) { assertEquals(options.getSendBufferSize(), copy.getSendBufferSize()); assertEquals(options.getReceiveBufferSize(), copy.getReceiveBufferSize()); assertEquals(options.isReuseAddress(), copy.isReuseAddress()); assertEquals(options.getTrafficClass(), copy.getTrafficClass());
assertIllegalArgumentException(() -> options.setSendBufferSize(-123)); assertEquals(NetworkOptions.DEFAULT_RECEIVE_BUFFER_SIZE, options.getReceiveBufferSize()); rand = TestUtils.randomPositiveInt(); assertEquals(options, options.setReceiveBufferSize(rand)); assertEquals(rand, options.getReceiveBufferSize()); assertIllegalArgumentException(() -> options.setReceiveBufferSize(0)); assertIllegalArgumentException(() -> options.setReceiveBufferSize(-123));