本文整理汇总了C#中SearchIssuesRequest类的典型用法代码示例。如果您正苦于以下问题:C# SearchIssuesRequest类的具体用法?C# SearchIssuesRequest怎么用?C# SearchIssuesRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SearchIssuesRequest类属于命名空间,在下文中一共展示了SearchIssuesRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TestingTheInvolvesQualifier
public void TestingTheInvolvesQualifier()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Involves = "alfhenrik";
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+involves:alfhenrik"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例2: TestingTheStateQualifier_Closed
public void TestingTheStateQualifier_Closed()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.State = ItemState.Closed;
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+state:Closed"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例3: TestingTheInQualifiers_Multiple
public void TestingTheInQualifiers_Multiple()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.In = new[] { IssueInQualifier.Body, IssueInQualifier.Title };
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+in:body,title"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例4: TestingTheTypeQualifier_PR
public void TestingTheTypeQualifier_PR()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Type = IssueTypeQualifier.PR;
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+type:pr"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例5: TestingTheRepoQualifier
public void TestingTheRepoQualifier()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Repo = "octokit.net";
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+repo:octokit.net"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例6: TestingTheTermParameter
public void TestingTheTermParameter()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("pub");
client.SearchIssues(request);
connection.Received().GetAll<Issue>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "pub"));
}
开发者ID:pgarbe,项目名称:octokit.net,代码行数:12,代码来源:SearchClientTests.cs
示例7: TestingTheRepoAndUserAndLabelQualifier
public void TestingTheRepoAndUserAndLabelQualifier()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Repo = "octokit.net";
request.User = "alfhenrik";
request.Labels = new[] { "bug" };
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] ==
"something+label:bug+user:alfhenrik+repo:octokit.net"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:16,代码来源:SearchClientTests.cs
示例8: TestingTheUpdatedQualifier_LessThanOrEquals
public void TestingTheUpdatedQualifier_LessThanOrEquals()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Updated = DateRange.LessThanOrEquals(new DateTime(2014, 1, 1));
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+updated:<=2014-01-01"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例9: ErrorOccursWhenSpecifyingInvalidFormatForRepos
public async Task ErrorOccursWhenSpecifyingInvalidFormatForRepos()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("windows");
request.Repos = new RepositoryCollection {
"haha-business"
};
request.SortField = IssueSearchSort.Created;
request.Order = SortDirection.Descending;
await Assert.ThrowsAsync<RepositoryFormatException>(
async () => await client.SearchIssues(request));
}
开发者ID:naveensrinivasan,项目名称:octokit.net,代码行数:16,代码来源:SearchClientTests.cs
示例10: SearchIssues
/// <summary>
/// search issues
/// http://developer.github.com/v3/search/#search-issues
/// </summary>
/// <param name="search"></param>
/// <returns>List of issues</returns>
public IObservable<SearchIssuesResult> SearchIssues(SearchIssuesRequest search)
{
Ensure.ArgumentNotNull(search, "search");
return _client.SearchIssues(search).ToObservable();
}
开发者ID:cloudRoutine,项目名称:octokit.net,代码行数:11,代码来源:ObservableSearchClient.cs
示例11: TestingTheCreatedQualifier_Between
public void TestingTheCreatedQualifier_Between()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Created = DateRange.Between(new DateTime(2014, 1, 1), new DateTime(2014, 2, 2));
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+created:2014-01-01..2014-02-02"));
}
开发者ID:naveensrinivasan,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例12: TestingTheCommentsQualifier_LessThanOrEqual
public void TestingTheCommentsQualifier_LessThanOrEqual()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Comments = Range.LessThanOrEquals(10);
client.SearchIssues(request);
connection.Received().GetAll<Issue>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+comments:<=10"));
}
开发者ID:pgarbe,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例13: TestingTheInQualifier
public void TestingTheInQualifier()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.In = new[] { IssueInQualifier.Comment };
client.SearchIssues(request);
connection.Received().GetAll<Issue>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+in:comment"));
}
开发者ID:pgarbe,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例14: TestingTheLabelsQualifier_Multiple
public void TestingTheLabelsQualifier_Multiple()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Labels = new[] { "bug", "feature" };
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+label:bug+label:feature"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例15: TestingTheSortParameter
public void TestingTheSortParameter()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.SortField = IssueSearchSort.Comments;
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d =>
d["sort"] == "comments"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:14,代码来源:SearchClientTests.cs
示例16: TestingTheLanguageQualifier
public void TestingTheLanguageQualifier()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Language = Language.CSharp;
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+language:CSharp"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例17: TestingTheOrderParameter
public void TestingTheOrderParameter()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.SortField = IssueSearchSort.Updated;
request.Order = SortDirection.Ascending;
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d =>
d["sort"] == "updated" &&
d["order"] == "asc"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:16,代码来源:SearchClientTests.cs
示例18: TestingTheCommentsQualifier_Range
public void TestingTheCommentsQualifier_Range()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
request.Comments = new Range(10, 20);
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+comments:10..20"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例19: TestingTheDefaultOrderParameter
public void TestingTheDefaultOrderParameter()
{
var connection = Substitute.For<IApiConnection>();
var client = new SearchClient(connection);
var request = new SearchIssuesRequest("something");
client.SearchIssues(request);
connection.Received().Get<SearchIssuesResult>(
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
Arg.Is<Dictionary<string, string>>(d =>
d["order"] == "desc"));
}
开发者ID:nsavga,项目名称:octokit.net,代码行数:13,代码来源:SearchClientTests.cs
示例20: SearchIssues
/// <summary>
/// search issues
/// http://developer.github.com/v3/search/#search-issues
/// </summary>
/// <param name="request"></param>
/// <returns>List of issues</returns>
public IObservable<Issue> SearchIssues(SearchIssuesRequest request)
{
Ensure.ArgumentNotNull(request, "request");
return _connection.GetAndFlattenAllPages<Issue>(ApiUrls.SearchIssues(), request.ToParametersDictionary());
}
开发者ID:rgmills,项目名称:octokit.net,代码行数:11,代码来源:ObservableSearchClient.cs
注:本文中的SearchIssuesRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论