public void Should_ReturnEmpty_WhenNoAnswersFound()
        {
            var filter = fixture.Create <SubmittedAnswersFilter>();

            submittedAnswersProviderSetup.Setup(p => p.GetAnswers(filter))
            .Returns(new SubmittedAnswer[0]);

            var learningObjectives = learningObjectivesProvider.GetLearningObjectives(filter);

            learningObjectives.Should().NotBeNull();
            learningObjectives.Should().BeEmpty();
        }
예제 #2
0
        public IEnumerable <LearningObjectiveDto> GetLearningObjectives([FromQuery] DateRangeFilterDto filter)
        {
            var internalFilter     = submittedAnswersFilterBuilder.Build(filter);
            var learningObjectives = learningObjectivesProvider.GetLearningObjectives(internalFilter);

            return(learningObjectives.Select(learningObjectiveDtoBuilder.Build)
                   .ToArray());
        }