private void AssertThatTheQuestionsHasTheSameDataOfTheTemplate(MeetingModel meeting) { for (int i = 0; i < meeting.Questions.Count(); i++) { QuestionModel questionModel = meeting.Questions.ElementAt(i); TemplateQuestion questionTemplate = questionTemplates.ElementAt(i); Assert.That(questionModel.Id, Is.Not.EqualTo(Guid.Empty)); Assert.AreEqual(questionTemplate.Description, questionModel.Description); Assert.AreEqual(questionTemplate.GetAnswerDescription(Answer.Red), questionModel.RedAnswer); Assert.AreEqual(questionTemplate.GetAnswerDescription(Answer.Green), questionModel.GreenAnswer); } }
public void HasTheSameAnswerDescriptionOfTheTemplate() { TemplateQuestion questionTemplate = CreateQuestionTemplate(); Question question = new Question(questionTemplate); Assert.That(question.GetAnswerDescription(Answer.Green), Is.Not.Empty.And.Not.Null.And.EqualTo(questionTemplate.GetAnswerDescription(Answer.Green))); Assert.That(question.GetAnswerDescription(Answer.Red), Is.Not.Empty.And.Not.Null.And.EqualTo(questionTemplate.GetAnswerDescription(Answer.Red))); Assert.That(question.GetAnswerDescription(Answer.Yellow), Is.Null); }