예제 #1
0
    public void TestNextQuestionRemovesQuestionFromList()
    {
        var instance = new ListOfSpeakersViewModel();
        var question = instance.AddQuestion("Question");

        instance.NextQuestion();
        Assert.IsFalse(instance.Questions.Any());
    }
예제 #2
0
    public void TestStartQuestionFromStopResetsTime()
    {
        var instance = new ListOfSpeakersViewModel();

        instance.QuestionTime = new TimeSpan(0, 0, 30);
        var question = instance.AddQuestion("Question");

        instance.NextQuestion();
        instance.ResumeQuestion();
        // 29 to have a little puffer but this should compute instant
        Assert.IsTrue(instance.RemainingQuestionTime.TotalSeconds >= 29);
    }