public void ValidSearchReturnsOnlyResultsFromTheSpecifiedTouristSpot() { var lodgings = new List <Lodging> { CreateLodging(1, TouristSpots.ElementAt(0)), CreateLodging(2, TouristSpots.ElementAt(0)) }; Context.AddRange(lodgings); var bookings = new List <Booking> { CreateBooking(1, lodgings.ElementAt(0), false), CreateBooking(2, lodgings.ElementAt(1), false) }; Context.AddRange(bookings); Context.SaveChanges(); var returnedValue = Repository.Search(ReportModel); Assert.IsTrue(returnedValue.All(report => report.TouristSpotId == TouristSpots.ElementAt(0).Id)); }