Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
Fixed failing tests and added new ones. Related to #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgi committed Mar 20, 2017
1 parent 185d5f9 commit bee75c4
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions GraphQLinq.Tests/SuperChargersGraphContextTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void FilteringQueryWithScalarParameterGeneratedQueryIncludesPassedParamet

var query = locations.ToString();

Assert.That(query, Does.Contain("openSoon: true"));
Assert.That(query, Does.Contain("openSoon\":true"));
}

[Test]
Expand All @@ -113,7 +113,27 @@ public void FilteringQueryWithCollectionParameterGeneratedQueryIncludesPassedPar

var query = locations.ToString();

Assert.That(query, Does.Contain("type: [SERVICE, STORE]"));
Assert.That(query, Does.Contain("type\":[\"SERVICE\",\"STORE\"]"));
}

[Test]
public void FilteringQueryWithCollectionParameterGeneratedQueryIncludesPassedParameterTypeInformation()
{
var locations = context.Locations(type: new List<LocationType> { LocationType.SERVICE, LocationType.STORE }).Select(l => l.city);

var query = locations.ToString();

Assert.That(query, Does.Contain("$type: [LocationType]"));
}

[Test]
public void FilteringQueryWithCollectionParameterGeneratedQueryFiltersLocationsByType()
{
var locations = context.Locations(type: new List<LocationType> { LocationType.SERVICE, LocationType.STORE }).Select(l => l.city);

var query = locations.ToString();

Assert.That(query, Does.Contain("type: $type"));
}
}
}

0 comments on commit bee75c4

Please sign in to comment.