public void TestResetQuestionTIme() { var instance = new ListOfSpeakersViewModel(); instance.AddQuestion("Question 1"); instance.NextQuestion(); instance.ResumeQuestion(); instance.AddQuestionSeconds(-10); Assert.AreEqual(20, instance.RemainingQuestionTime.TotalSeconds, 0.5); instance.ResetQuestionTime(); Assert.AreEqual(30, instance.RemainingQuestionTime.TotalSeconds, 0.5); }
public void TestResumePausedQuestion() { var instance = new ListOfSpeakersViewModel(); instance.QuestionTime = new TimeSpan(0, 0, 30); instance.AddQuestion("Speaker"); instance.NextQuestion(); instance.ResumeQuestion(); instance.AddQuestionSeconds(-10); instance.Pause(); Assert.AreEqual(20, instance.RemainingQuestionTime.TotalSeconds, 0.5); instance.ResumeQuestion(); Assert.AreEqual(20, instance.RemainingQuestionTime.TotalSeconds, 0.5); }