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(); }
public IEnumerable <LearningObjectiveDto> GetLearningObjectives([FromQuery] DateRangeFilterDto filter) { var internalFilter = submittedAnswersFilterBuilder.Build(filter); var learningObjectives = learningObjectivesProvider.GetLearningObjectives(internalFilter); return(learningObjectives.Select(learningObjectiveDtoBuilder.Build) .ToArray()); }