@Test public void testTriggerInSimulationCanceled() { NewRenoTcpSocket socket = mock(NewRenoTcpSocket.class); TcpRetransmissionTimeOutEvent event = new TcpRetransmissionTimeOutEvent(999, socket); event.cancel(); Simulator.registerEvent(event); Simulator.runNs(999); verify(socket, times(0)).handleRetransmissionTimeOut(); }
public void cancel() { this.active = false; }
TcpRetransmissionTimeOutEvent extends Event { public void cancel() { this.active = false; } }
TcpRetransmissionTimeOutEvent extends Event { public void cancel() { this.active = false; } TcpRetransmissionTimeOutEvent(long timeFromNowNs, NewRenoTcpSocket tcpSocket); }
TcpRetransmissionTimeOutEvent extends Event { public void cancel() { this.active = false; } TcpRetransmissionTimeOutEvent(long timeFromNowNs, NewRenoTcpSocket tcpSocket); @Override void trigger(); void cancel(); @Override String toString(); }
TcpRetransmissionTimeOutEvent extends Event { public void cancel() { this.active = false; } TcpRetransmissionTimeOutEvent(long timeFromNowNs, NewRenoTcpSocket tcpSocket); @Override void trigger(); void cancel(); @Override String toString();  }