Example #1
0
        public void GetSetOfQuestions_ReturnsExpectedNumberOfQuestion_WhenProvidedNumberGreaterThanZero(int numberOfQuestionsToReturn)
        {
            //Arrange
            _quizRepository.GetAllQuestions().Returns(_allDatabaseQuestions.AsQueryable());

            //Act
            var result = _service.GetSetOfQuestions(numberOfQuestionsToReturn);

            //Assert
            Assert.That(result.Count(), Is.EqualTo(numberOfQuestionsToReturn));
        }