public async Task FindAsyncShouldReturnCorrectResultWithFilterAndOrder() { // Arrange var db = this.GetDatabase(); var firstCourse = new Program { Id = 1, Name = "First" }; var secondCourse = new Program { Id = 2, Name = "Second" }; var thirdCourse = new Program { Id = 3, Name = "Third" }; db.AddRange(firstCourse, secondCourse, thirdCourse); await db.SaveChangesAsync(); var programService = new ProgramService(db); // Act var result = await programService.FindAsync("t"); // Assert result .Should() .Match(r => r.ElementAt(0).Id == 3 && r.ElementAt(1).Id == 1) .And .HaveCount(2); }