Esempio n. 1
0
        public void Recorder_When_30_Sec_Add_0_Minute_Remains_Unchanged()
        {
            IRecorder exerciseRecorder = new TestExerciseRecorder(30);

            exerciseRecorder.AddMinutes(0);
            Assert.AreEqual(30, exerciseRecorder.PreciseSeconds);
        }
Esempio n. 2
0
        public void Recorder_When_50_Sec_Add_2_Minute_Goes_To_Next_Exact_Minute()
        {
            IRecorder exerciseRecorder = new TestExerciseRecorder(110);

            exerciseRecorder.AddMinutes(2);
            Assert.AreEqual(180, exerciseRecorder.PreciseSeconds);
        }
Esempio n. 3
0
        public void Recorder_When_1_Min_Add_2_Minute_Goes_To_3_Minute()
        {
            IRecorder exerciseRecorder = new TestExerciseRecorder(60);

            exerciseRecorder.AddMinutes(2);
            Assert.AreEqual(180, exerciseRecorder.PreciseSeconds);
        }
Esempio n. 4
0
        public void Recorder_When_Added_And_SecondsAreFraction_Removes_Fraction_InIncrement()
        {
            IRecorder exerciseRecorder = new TestExerciseRecorder(110.3);

            exerciseRecorder.AddMinutes(2);
            Assert.AreEqual(180, exerciseRecorder.PreciseSeconds);
        }
Esempio n. 5
0
        public void Recorder_Attempt_Add_Minutes_When_Recording_Does_Nothing()
        {
            IRecorder exerciseRecorder = new TestExerciseRecorder(110);

            exerciseRecorder.Resume();
            exerciseRecorder.AddMinutes(2);
            exerciseRecorder.Pause();

            Assert.That(exerciseRecorder.PreciseSeconds, Is.InRange(110, 112));
        }
Esempio n. 6
0
        public void Recorder_TickActionCallBack_Called_After_Adding_Minutes()
        {
            bool      fired            = false;
            Action    action           = () => fired = true;
            IRecorder exerciseRecorder = new TestExerciseRecorder(110);

            exerciseRecorder.TickActionCallBack = action;

            exerciseRecorder.AddMinutes(2);

            Assert.IsTrue(fired);
        }