From fe0b8bc13915737dfdeb2cac08fc563baaf5812c Mon Sep 17 00:00:00 2001 From: Giorgi Dalakishvili Date: Tue, 28 Mar 2017 00:08:09 +0400 Subject: [PATCH] Refactored some of the integration tests. --- GraphQLinq.Tests/IntegrationTests.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/GraphQLinq.Tests/IntegrationTests.cs b/GraphQLinq.Tests/IntegrationTests.cs index 7a38235..6f6cb60 100644 --- a/GraphQLinq.Tests/IntegrationTests.cs +++ b/GraphQLinq.Tests/IntegrationTests.cs @@ -34,9 +34,7 @@ public void SelectingLocationsDoesNotReturnPhones() var query = superChargersContext.Locations(type: locationTypes); var locations = query.ToList(); - - var locationsWithPhones = locations.Where(location => location.salesPhone != null).ToList(); - CollectionAssert.IsEmpty(locationsWithPhones); + Assert.That(locations, Is.All.Matches(l => l.salesPhone == null)); } [Test] @@ -46,8 +44,7 @@ public void SelectingLocationsAndIncludingPhonesReturnsPhones() var locations = query.ToList(); - var locationsWithNullPhones = locations.Where(location => location.salesPhone == null).ToList(); - CollectionAssert.IsEmpty(locationsWithNullPhones); + Assert.That(locations, Is.All.Matches(l => l.salesPhone != null)); } [Test]