public void SelectListByIdWithTwoQuestions_ShouldReturnQuestionAmountOfTwo() { TestViewQuestionList view = new TestViewQuestionList(); ListQuestionListController QuestionListController = new ListQuestionListController(view); QuestionListController.SetBaseFactory(new TestQuestionListFactory()); QuestionListController.Load(); Model.Question q = new Model.Question(); view.AddToList(q, 1); view.AddToList(q, 2); view.AddToList(q, 2); Model.QuestionList list = view.getById(2); Assert.AreEqual(list.MCQuestions.Count, 2); }
public void SelectListByListId_ShouldReturnRightIdAndName() { TestViewQuestionList view = new TestViewQuestionList(); ListQuestionListController QuestionListController = new ListQuestionListController(view); QuestionListController.SetBaseFactory(new TestQuestionListFactory()); QuestionListController.Load(); Model.QuestionList list = view.getById(2); Assert.AreEqual(list.Id, 2); Assert.AreEqual(list.Name, "2"); }