diff --git a/Octokit.Tests/Clients/SearchClientTests.cs b/Octokit.Tests/Clients/SearchClientTests.cs index a7e03ec72c..a9800ca3d3 100644 --- a/Octokit.Tests/Clients/SearchClientTests.cs +++ b/Octokit.Tests/Clients/SearchClientTests.cs @@ -200,13 +200,13 @@ public void TestingTheLanguageQualifier() { var connection = Substitute.For(); var client = new SearchClient(connection); - //get users who have mostly repos where language is Ruby + //get users who have mostly repos where language is Literate Haskell var request = new SearchUsersRequest("github"); - request.Language = Language.Ruby; + request.Language = Language.LiterateHaskell; client.SearchUsers(request); connection.Received().Get( Arg.Is(u => u.ToString() == "search/users"), - Arg.Is>(d => d["q"] == "github+language:Ruby")); + Arg.Is>(d => d["q"] == "github+language:\"Literate Haskell\"")); } [Fact] @@ -462,12 +462,12 @@ public void TestingTheLangaugeQualifier() { var connection = Substitute.For(); var client = new SearchClient(connection); - //get repos who's language is Ruby + //get repos who's language is Literate Haskell var request = new SearchRepositoriesRequest("github"); - request.Language = Language.Ruby; + request.Language = Language.LiterateHaskell; client.SearchRepo(request); connection.Received().Get(Arg.Is(u => u.ToString() == "search/repositories"), - Arg.Is>(d => d["q"] == "github+language:ruby")); + Arg.Is>(d => d["q"] == "github+language:\"Literate Haskell\"")); } [Fact] @@ -986,13 +986,13 @@ public void TestingTheLanguageQualifier() var connection = Substitute.For(); var client = new SearchClient(connection); var request = new SearchIssuesRequest("something"); - request.Language = Language.CSharp; + request.Language = Language.LiterateHaskell; client.SearchIssues(request); connection.Received().Get( Arg.Is(u => u.ToString() == "search/issues"), - Arg.Is>(d => d["q"] == "something+language:CSharp")); + Arg.Is>(d => d["q"] == "something+language:\"Literate Haskell\"")); } [Fact] @@ -1682,13 +1682,13 @@ public void TestingTheLanguageQualifier() var connection = Substitute.For(); var client = new SearchClient(connection); var request = new SearchCodeRequest("something"); - request.Language = Language.CSharp; + request.Language = Language.LiterateHaskell; client.SearchCode(request); connection.Received().Get( Arg.Is(u => u.ToString() == "search/code"), - Arg.Is>(d => d["q"] == "something+language:CSharp")); + Arg.Is>(d => d["q"] == "something+language:\"Literate Haskell\"")); } [Fact] diff --git a/Octokit.Tests/Models/SearchIssuesRequestExclusionsTests.cs b/Octokit.Tests/Models/SearchIssuesRequestExclusionsTests.cs index bfe9f8da9c..fdbaab560f 100644 --- a/Octokit.Tests/Models/SearchIssuesRequestExclusionsTests.cs +++ b/Octokit.Tests/Models/SearchIssuesRequestExclusionsTests.cs @@ -68,7 +68,7 @@ public void HandlesLanguageAttributeCorrectly() request.Language = Language.CSharp; - Assert.Contains("-language:CSharp", request.MergedQualifiers()); + Assert.Contains("-language:\"CSharp\"", request.MergedQualifiers()); } [Fact] diff --git a/Octokit.Tests/Models/SearchIssuesRequestTests.cs b/Octokit.Tests/Models/SearchIssuesRequestTests.cs index 99576bfef8..caafd0ba5c 100644 --- a/Octokit.Tests/Models/SearchIssuesRequestTests.cs +++ b/Octokit.Tests/Models/SearchIssuesRequestTests.cs @@ -156,7 +156,7 @@ public void HandlesLanguageAttributeCorrectly() Assert.DoesNotContain(request.MergedQualifiers(), x => x.Contains("language:")); request.Language = Language.CSharp; - Assert.Contains("language:CSharp", request.MergedQualifiers()); + Assert.Contains("language:\"CSharp\"", request.MergedQualifiers()); } [Fact] diff --git a/Octokit.Tests/Models/SearchRepositoryRequestTests.cs b/Octokit.Tests/Models/SearchRepositoryRequestTests.cs index c01c7288a0..ebeda46282 100644 --- a/Octokit.Tests/Models/SearchRepositoryRequestTests.cs +++ b/Octokit.Tests/Models/SearchRepositoryRequestTests.cs @@ -31,7 +31,7 @@ public void LanguageUsesParameterTranslation() { var request = new SearchRepositoriesRequest() { Language = Language.CPlusPlus }; var result = request.MergedQualifiers(); - Assert.Contains(result, x => string.Equals(x, "language:cpp")); + Assert.Contains(result, x => string.Equals(x, "language:\"cpp\"")); } } } diff --git a/Octokit/Models/Request/SearchCodeRequest.cs b/Octokit/Models/Request/SearchCodeRequest.cs index 22a92354a5..9c4795fa67 100644 --- a/Octokit/Models/Request/SearchCodeRequest.cs +++ b/Octokit/Models/Request/SearchCodeRequest.cs @@ -169,7 +169,7 @@ public override IReadOnlyList MergedQualifiers() if (Language != null) { - parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:{0}", Language.ToParameter())); + parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:\"{0}\"", Language.ToParameter())); } if (Forks != null) diff --git a/Octokit/Models/Request/SearchIssuesRequest.cs b/Octokit/Models/Request/SearchIssuesRequest.cs index a644cdc6b0..2600e27472 100644 --- a/Octokit/Models/Request/SearchIssuesRequest.cs +++ b/Octokit/Models/Request/SearchIssuesRequest.cs @@ -338,7 +338,7 @@ public override IReadOnlyList MergedQualifiers() if (Language != null) { - parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:{0}", Language.ToParameter())); + parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:\"{0}\"", Language.ToParameter())); } if (Is != null) diff --git a/Octokit/Models/Request/SearchIssuesRequestExclusions.cs b/Octokit/Models/Request/SearchIssuesRequestExclusions.cs index 38815a2a65..4362c3e206 100644 --- a/Octokit/Models/Request/SearchIssuesRequestExclusions.cs +++ b/Octokit/Models/Request/SearchIssuesRequestExclusions.cs @@ -170,7 +170,7 @@ public IReadOnlyList MergedQualifiers() if (Language != null) { - parameters.Add(string.Format(CultureInfo.InvariantCulture, "-language:{0}", Language.ToParameter())); + parameters.Add(string.Format(CultureInfo.InvariantCulture, "-language:\"{0}\"", Language.ToParameter())); } if (Status.HasValue) diff --git a/Octokit/Models/Request/SearchRepositoriesRequest.cs b/Octokit/Models/Request/SearchRepositoriesRequest.cs index 677481056f..48d0964535 100644 --- a/Octokit/Models/Request/SearchRepositoriesRequest.cs +++ b/Octokit/Models/Request/SearchRepositoriesRequest.cs @@ -148,7 +148,7 @@ public override IReadOnlyList MergedQualifiers() if (Language != null) { - parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:{0}", Language.ToParameter())); + parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:\"{0}\"", Language.ToParameter())); } if (User.IsNotBlank()) diff --git a/Octokit/Models/Request/SearchUsersRequest.cs b/Octokit/Models/Request/SearchUsersRequest.cs index 3d8d783647..760ac87322 100644 --- a/Octokit/Models/Request/SearchUsersRequest.cs +++ b/Octokit/Models/Request/SearchUsersRequest.cs @@ -117,7 +117,7 @@ public override IReadOnlyList MergedQualifiers() if (Language != null) { - parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:{0}", Language)); + parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:\"{0}\"", Language.ToParameter())); } if (Created != null)