Example #1
0
        public List <PresentationTest> GetTests()
        {
            var tests     = _testDao.GetAll();
            var questions = _questionDao.GetAll();
            var answers   = _answerDao.GetAll();

            return(tests.Select(test => new PresentationTest
            {
                Title = test.Title,
                Id = test.Id,
                Time = test.Time,
                QuestionsCount = test.QuestionsCount,
                QuestionsList = GetPresentationQuestions(answers, questions, test.Id)
            }).ToList());
        }
        public void Can_GeAll_Questions()
        {
            // Arrange

            var questionDao = new QuestionDao();

            //Action
            var result = questionDao.GetAll();

            // AAsserts
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Count() > 0);
        }