Пример #1
0
        public void GetAllQuestionsAsync_WhenNoQuestionsForSurveySearchedFor_ReturnsOkNoResults()
        {
            var response = _controller.GetAllQuestionsAsync(_nonMatchingGuid).Result;

            _questionService.Verify(repo => repo.GetQuestionsBySurveyId(_nonMatchingGuid), Times.Exactly(1));
            Assert.IsType <OkObjectResult>(response);

            var options = ((OkObjectResult)response).Value as IList <ISurveyQuestion>;

            Assert.Null(options);
        }