@Test public void testTriggerNormal() { NewRenoTcpSocket socket = mock(NewRenoTcpSocket.class); TcpRetransmissionTimeOutEvent event = new TcpRetransmissionTimeOutEvent(1000, socket); event.trigger(); verify(socket, times(1)).handleRetransmissionTimeOut(); }
@Override public void trigger() { if (this.active) { tcpSocket.handleRetransmissionTimeOut(); } }
TcpRetransmissionTimeOutEvent extends Event { @Override public void trigger() { if (this.active) { tcpSocket.handleRetransmissionTimeOut(); } } }
TcpRetransmissionTimeOutEvent extends Event { @Override public void trigger() { if (this.active) { tcpSocket.handleRetransmissionTimeOut(); } } TcpRetransmissionTimeOutEvent(long timeFromNowNs, NewRenoTcpSocket tcpSocket); }
TcpRetransmissionTimeOutEvent extends Event { @Override public void trigger() { if (this.active) { tcpSocket.handleRetransmissionTimeOut(); } } TcpRetransmissionTimeOutEvent(long timeFromNowNs, NewRenoTcpSocket tcpSocket); @Override void trigger(); void cancel(); @Override String toString(); }
TcpRetransmissionTimeOutEvent extends Event { @Override public void trigger() { if (this.active) { tcpSocket.handleRetransmissionTimeOut(); } } TcpRetransmissionTimeOutEvent(long timeFromNowNs, NewRenoTcpSocket tcpSocket); @Override void trigger(); void cancel(); @Override String toString();  }