private TransportThrottle NewThrottleAndInstall(Channel channel, ThrottleLock lockOverride, Clock clock, Duration maxLockDuration) { TransportThrottle throttle = NewThrottle(lockOverride, clock, maxLockDuration); throttle.Install(channel); return(throttle); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldSetWriteBufferWatermarkOnChannelConfigWhenInstalled() public virtual void ShouldSetWriteBufferWatermarkOnChannelConfigWhenInstalled() { // given TransportThrottle throttle = NewThrottle(); // when throttle.Install(_channel); // expect ArgumentCaptor <WriteBufferWaterMark> argument = ArgumentCaptor.forClass(typeof(WriteBufferWaterMark)); verify(_config, times(1)).WriteBufferWaterMark = argument.capture(); assertEquals(64, argument.Value.low()); assertEquals(256, argument.Value.high()); }