public void TestStartAnswerWithoutCurrentSpeakerStopsList() { var instance = new ListOfSpeakersViewModel(); instance.StartAnswer(); Assert.AreEqual(ESpeakerListStatus.Stopped, instance.Status); }
public void TestPauseWhileAnswerPausesAnswer() { var instance = new ListOfSpeakersViewModel(); instance.AddSpeaker("Speaker"); instance.NextSpeaker(); instance.StartAnswer(); Assert.AreEqual(ESpeakerListStatus.Answer, instance.Status); instance.Pause(); Assert.AreEqual(ESpeakerListStatus.AnswerPaused, instance.Status); }
public void TestAnswerSetsTimeToQuestionTime() { var instance = new ListOfSpeakersViewModel(); instance.QuestionTime = new TimeSpan(0, 0, 30); instance.AddSpeaker("Speaker"); instance.NextSpeaker(); instance.StartAnswer(); Assert.AreEqual(30, instance.RemainingSpeakerTime.TotalSeconds, 1); //Assert.IsTrue(instance.RemainingSpeakerTime.TotalSeconds >= 29 && instance.RemainingSpeakerTime.TotalSeconds <= 30); }
public void TestResumePausedAnswer() { var instance = new ListOfSpeakersViewModel(); instance.QuestionTime = new TimeSpan(0, 0, 30); instance.AddSpeaker("Speaker"); instance.NextSpeaker(); instance.StartAnswer(); instance.AddSpeakerSeconds(-10); instance.Pause(); Assert.AreEqual(20, instance.RemainingSpeakerTime.TotalSeconds, 0.5); instance.ResumeSpeaker(); Assert.AreEqual(20, instance.RemainingSpeakerTime.TotalSeconds, 0.5); }