Пример #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 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();
        }