public void NewsServiceAllShouldReturnAllNewsOrdered() { // Arrange Mapper.Initialize(config => config.AddProfile <AutoMapperProfile>()); var db = this.Context; this.PopulateData(db); var newsService = new NewsService(db); // Act var result = newsService.All(); // Assert result .Should() .Match(r => r.ElementAt(0).Id == 1 && r.ElementAt(1).Id == 3 && r.ElementAt(2).Id == 2) .And .HaveCount(3); }