public async Task ItShouldSearchAllExistingCoursesWithAnEmptyCriteria() { var existingCourse = BackofficeCourseMother.Random(); var anotherExistingCourse = BackofficeCourseMother.Random(); var existingCourses = new List <BackofficeCourse> { existingCourse, anotherExistingCourse }; await ElasticRepository.Save(existingCourse); await ElasticRepository.Save(anotherExistingCourse); await WaitFor(async() => (await ElasticRepository.SearchAll()).Any()); Assert.Equal(existingCourses, (await ElasticRepository.Matching(CriteriaMother.Empty())).ToList()); }