public void Returns_0_percent_when_warning_time_is_up() { int time = 90; const int expected = 0; Assert.True(_warning.IsTimeForWarning(time), "Precondition failed, warning is not due"); int percent = _warning.ProgressPercent(time); Assert.Equal(expected, percent); }
private void CreepCountdown(int clocktime) { if (_config.CreepToggle && !WarningDurationExpired(clocktime, _config.CreepStopWarningAfterMinutes)) { CreepProgress = _creepWarning.ProgressPercent(clocktime); if (_creepWarning.IsTimeForWarning(clocktime)) { PlayCreepWarningIfNotMuted(); } } else { CreepProgress = 0; } }
private void RuneCountdown(int clocktime) { if (_config.RuneToggle && !WarningDurationExpired(clocktime, _config.RuneStopWarningAfterMinutes)) { RuneProgress = _runeWarning.ProgressPercent(clocktime); if (_runeWarning.IsTimeForWarning(clocktime)) { PlayRuneAlarmIfNotMuted(); } } else { RuneProgress = 0; } }
public void Game_time_0_should_not_warn() { Assert.False(_warning.IsTimeForWarning(0)); }