当前位置: 首页>>代码示例>>C#>>正文


C# SearchClient.SearchIssues方法代码示例

本文整理汇总了C#中SearchClient.SearchIssues方法的典型用法代码示例。如果您正苦于以下问题:C# SearchClient.SearchIssues方法的具体用法?C# SearchClient.SearchIssues怎么用?C# SearchClient.SearchIssues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SearchClient的用法示例。


在下文中一共展示了SearchClient.SearchIssues方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: RequestsTheCorrectUrl

 public void RequestsTheCorrectUrl()
 {
     var connection = Substitute.For<IApiConnection>();
     var client = new SearchClient(connection);
     client.SearchIssues(new SearchIssuesRequest("something"));
     connection.Received().Get<SearchIssuesResult>(Arg.Is<Uri>(u => u.ToString() == "search/issues"), Arg.Any<Dictionary<string, string>>());
 }
开发者ID:nsavga,项目名称:octokit.net,代码行数:7,代码来源:SearchClientTests.cs

示例8: 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

示例9: EnsuresNonNullArguments

 public async Task EnsuresNonNullArguments()
 {
     var client = new SearchClient(Substitute.For<IApiConnection>());
     await Assert.ThrowsAsync<ArgumentNullException>(() => client.SearchIssues(null));
 }
开发者ID:naveensrinivasan,项目名称:octokit.net,代码行数:5,代码来源:SearchClientTests.cs

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: EnsuresNonNullArguments

 public void EnsuresNonNullArguments()
 {
     var client = new SearchClient(Substitute.For<IApiConnection>());
     Assert.Throws<ArgumentNullException>(() => client.SearchIssues(null));
 }
开发者ID:nsavga,项目名称:octokit.net,代码行数:5,代码来源:SearchClientTests.cs


注:本文中的SearchClient.SearchIssues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。