@Test(expectedExceptions = IllegalArgumentException.class) public void limitTimeToFailsIfPeriodIsZero() { new Repeater("limitTimeToFailsIfPeriodIsZero").limitTimeTo(0, TimeUnit.MILLISECONDS); }
public Repeater limitTimeTo(long deadline, TimeUnit unit) { Preconditions.checkArgument(deadline > 0, "deadline must be positive: %s", deadline); Preconditions.checkNotNull(unit, "unit must not be null"); this.durationLimit = unit.toMillis(deadline); return this; }
Repeater { public Repeater limitTimeTo(long deadline, TimeUnit unit) { Preconditions.checkArgument(deadline > 0, "deadline must be positive: %s", deadline); Preconditions.checkNotNull(unit, "unit must not be null"); this.durationLimit = unit.toMillis(deadline); return this; } }
Repeater { public Repeater limitTimeTo(long deadline, TimeUnit unit) { Preconditions.checkArgument(deadline > 0, "deadline must be positive: %s", deadline); Preconditions.checkNotNull(unit, "unit must not be null"); this.durationLimit = unit.toMillis(deadline); return this; } Repeater();  Repeater(Map<?,?> flags);  Repeater(String description);  Repeater(Map<?,?> flags, String description); }
Repeater { public Repeater limitTimeTo(long deadline, TimeUnit unit) { Preconditions.checkArgument(deadline > 0, "deadline must be positive: %s", deadline); Preconditions.checkNotNull(unit, "unit must not be null"); this.durationLimit = unit.toMillis(deadline); return this; } Repeater();  Repeater(Map<?,?> flags);  Repeater(String description);  Repeater(Map<?,?> flags, String description); void setFromFlags(Map<?,?> flags); static Repeater create(); static Repeater create(Map<?,?> flags); static Repeater create(String description); static Repeater create(Map<?,?> flags, String description); Repeater repeat(); Repeater repeat(Runnable body); Repeater repeat(Callable<?> body); Repeater every(long period, TimeUnit unit); Repeater every(Duration duration); Repeater every(groovy.time.Duration duration); Repeater every(long duration); Repeater until(Callable<Boolean> exitCondition); Repeater rethrowException(); Repeater rethrowExceptionImmediately(); Repeater suppressWarnings(); Repeater limitIterationsTo(int iterationLimit); Repeater limitTimeTo(long deadline, TimeUnit unit); Repeater limitTimeTo(Duration duration); boolean run(); }
Repeater { public Repeater limitTimeTo(long deadline, TimeUnit unit) { Preconditions.checkArgument(deadline > 0, "deadline must be positive: %s", deadline); Preconditions.checkNotNull(unit, "unit must not be null"); this.durationLimit = unit.toMillis(deadline); return this; } Repeater();  Repeater(Map<?,?> flags);  Repeater(String description);  Repeater(Map<?,?> flags, String description); void setFromFlags(Map<?,?> flags); static Repeater create(); static Repeater create(Map<?,?> flags); static Repeater create(String description); static Repeater create(Map<?,?> flags, String description); Repeater repeat(); Repeater repeat(Runnable body); Repeater repeat(Callable<?> body); Repeater every(long period, TimeUnit unit); Repeater every(Duration duration); Repeater every(groovy.time.Duration duration); Repeater every(long duration); Repeater until(Callable<Boolean> exitCondition); Repeater rethrowException(); Repeater rethrowExceptionImmediately(); Repeater suppressWarnings(); Repeater limitIterationsTo(int iterationLimit); Repeater limitTimeTo(long deadline, TimeUnit unit); Repeater limitTimeTo(Duration duration); boolean run();  }