예제 #1
0
        public async Task TimerCanBeSetToACustomLength()
        {
            using var mobo = new Mobo();
            var customTimerLength = TimeSpan.FromMinutes(5);

            mobo.StartTheTimer(customTimerLength);
            mobo.TimeLeftOnTimerIs(customTimerLength);
            await mobo.CountDownIsRunning();
        }
예제 #2
0
        public async Task StartingTimerStartsTheCountdown()
        {
            using var mobo = new Mobo();
            mobo.StartTheTimer(CountDownTimer.Default);
            await mobo.CountDownIsRunning();

            mobo.TimerCantBeStarted();
            mobo.TimerCantBeResumed();
        }
예제 #3
0
        public async Task CountdownStopsAt0()
        {
            using var mobo = new Mobo();
            mobo.StartTheTimer(CountDownTimer.Default);
            await Clock.MoveForward(_defaultTimeLength);

            await mobo.CountDownIsPaused();

            mobo.CountDownCantBeReset();
        }
예제 #4
0
        public async Task ResetingTimerSetsTimeBackToOriginalTime()
        {
            using var mobo = new Mobo();
            var customTimerLength = TimeSpan.FromMinutes(5);

            mobo.StartTheTimer(customTimerLength);
            await Clock.MoveForward(TimeSpan.FromMinutes(3));

            mobo.ResetTimer();
            mobo.TimeLeftOnTimerIs(customTimerLength);
        }
예제 #5
0
        public async Task PausingTheTimerPausesTheCountdown()
        {
            using var mobo = new Mobo();
            mobo.StartTheTimer(CountDownTimer.Default);
            mobo.PauseTimer();
            await mobo.CountDownIsPaused();

            mobo.TimerCantBeStarted();
            mobo.TimerCantBePaused();
            mobo.TimerCanBeStarted();
        }
예제 #6
0
        public async Task ResumeAPausedTimer()
        {
            using var mobo = new Mobo();
            mobo.StartTheTimer(CountDownTimer.Default);
            await Clock.MoveForward(TimeSpan.FromSeconds(5));

            var time = mobo.TimeLeft();

            mobo.PauseTimer();
            await Clock.MoveForward(TimeSpan.FromSeconds(5));

            mobo.ResumeTimerResumesFrom(time);
            await mobo.CountDownIsRunning();
        }
예제 #7
0
 public void TimerCanNotBeSetToACustomLengthWhileTimerIsRunning()
 {
     using var mobo = new Mobo();
     mobo.StartTheTimer(TimeSpan.FromMinutes(5));
     mobo.TimerCannotBeChanged();
 }
예제 #8
0
 public async Task DefaultTimerStartsAt15mins()
 {
     using var mobo = new Mobo();
     mobo.TimeLeftOnTimerIs(_defaultTimeLength);
     await mobo.CountDownIsPaused();
 }