From 1b5507ba41283c38c98e6d6a97931f6ec4e260dc Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Thu, 14 Jul 2016 20:43:19 +0700 Subject: [PATCH 1/9] added htmlurl property --- Octokit/Models/Response/Page.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Octokit/Models/Response/Page.cs b/Octokit/Models/Response/Page.cs index 7a2aeda8f1..10a8672b4b 100644 --- a/Octokit/Models/Response/Page.cs +++ b/Octokit/Models/Response/Page.cs @@ -10,14 +10,17 @@ public enum PagesBuildStatus /// The site has yet to be built /// Null, + /// /// The build is in progress /// Building, + /// /// The site has been built /// Built, + /// /// An error occurred during the build /// @@ -46,15 +49,23 @@ public Page(string url, PagesBuildStatus status, string cname, bool custom404) /// The pages's API URL. /// public string Url { get; protected set; } + + /// + /// Absolute URL to the rendered site. + /// + public string HtmlUrl { get; protected set; } + /// /// Build status of the pages site. /// public PagesBuildStatus Status { get; protected set; } + /// /// CName of the pages site. Will be null if no CName was provided by the user. /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "CName")] public string CName { get; protected set; } + /// /// Is a custom 404 page provided. /// @@ -62,10 +73,7 @@ public Page(string url, PagesBuildStatus status, string cname, bool custom404) internal string DebuggerDisplay { - get - { - return string.Format(CultureInfo.InvariantCulture, "CName: {0}, Status: {1}", CName, Status.ToString()); - } + get { return string.Format(CultureInfo.InvariantCulture, "CName: {0}, Status: {1}", CName, Status.ToString()); } } } } From 41c663f6af4e728e4c280e081e7847e175718118 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Thu, 14 Jul 2016 20:49:42 +0700 Subject: [PATCH 2/9] added new overloads --- .../IObservableRepositoryPagesClient.cs | 19 +++++++++++++ .../ObservableRepositoryPagesClient.cs | 28 +++++++++++++++++++ Octokit/Clients/IRepositoryPagesClient.cs | 19 +++++++++++++ Octokit/Clients/RepositoryPagesClient.cs | 28 +++++++++++++++++++ 4 files changed, 94 insertions(+) diff --git a/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs index 8b9c19ad7b..9b135efe73 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs @@ -90,5 +90,24 @@ public interface IObservableRepositoryPagesClient /// See the API documentation for more information. /// IObservable GetLatest(int repositoryId); + + /// + /// Requests your site be built from the latest revision on the default branch for a given repository + /// + /// The owner of the repository + /// The name of the repository + /// + /// See the API documentation for more information. + /// + IObservable RequestPageBuild(string owner, string name); + + /// + /// Requests your site be built from the latest revision on the default branch for a given repository + /// + /// The ID of the repository + /// + /// See the API documentation for more information. + /// + IObservable RequestPageBuild(int repositoryId); } } diff --git a/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs index 1c61be78e5..8fd6cca0d9 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs @@ -141,5 +141,33 @@ public IObservable GetLatest(int repositoryId) { return _client.GetLatest(repositoryId).ToObservable(); } + + /// + /// Requests your site be built from the latest revision on the default branch for a given repository + /// + /// The owner of the repository + /// The name of the repository + /// + /// See the API documentation for more information. + /// + public IObservable RequestPageBuild(string owner, string name) + { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + + return _client.RequestPageBuild(owner, name).ToObservable(); + } + + /// + /// Requests your site be built from the latest revision on the default branch for a given repository + /// + /// The ID of the repository + /// + /// See the API documentation for more information. + /// + public IObservable RequestPageBuild(int repositoryId) + { + return _client.RequestPageBuild(repositoryId).ToObservable(); + } } } diff --git a/Octokit/Clients/IRepositoryPagesClient.cs b/Octokit/Clients/IRepositoryPagesClient.cs index 56747d9d2f..3db7fc25b3 100644 --- a/Octokit/Clients/IRepositoryPagesClient.cs +++ b/Octokit/Clients/IRepositoryPagesClient.cs @@ -91,5 +91,24 @@ public interface IRepositoryPagesClient /// See the API documentation for more information. /// Task GetLatest(int repositoryId); + + /// + /// Requests your site be built from the latest revision on the default branch for a given repository + /// + /// The owner of the repository + /// The name of the repository + /// + /// See the API documentation for more information. + /// + Task RequestPageBuild(string owner, string name); + + /// + /// Requests your site be built from the latest revision on the default branch for a given repository + /// + /// The ID of the repository + /// + /// See the API documentation for more information. + /// + Task RequestPageBuild(int repositoryId); } } diff --git a/Octokit/Clients/RepositoryPagesClient.cs b/Octokit/Clients/RepositoryPagesClient.cs index af3ff7c791..007d682d74 100644 --- a/Octokit/Clients/RepositoryPagesClient.cs +++ b/Octokit/Clients/RepositoryPagesClient.cs @@ -137,5 +137,33 @@ public Task GetLatest(int repositoryId) { return ApiConnection.Get(ApiUrls.RepositoryPageBuildsLatest(repositoryId)); } + + /// + /// Requests your site be built from the latest revision on the default branch for a given repository + /// + /// The owner of the repository + /// The name of the repository + /// + /// See the API documentation for more information. + /// + public Task RequestPageBuild(string owner, string name) + { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + + return ApiConnection.Post(ApiUrls.RepositoryPageBuilds(owner, name)); + } + + /// + /// Requests your site be built from the latest revision on the default branch for a given repository + /// + /// The ID of the repository + /// + /// See the API documentation for more information. + /// + public Task RequestPageBuild(int repositoryId) + { + return ApiConnection.Post(ApiUrls.RepositoryPageBuilds(repositoryId)); + } } } From 52b18a1796b1023a5dd1608beff9980305edcf24 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Thu, 14 Jul 2016 20:58:27 +0700 Subject: [PATCH 3/9] added Pages Api preview accept headers --- Octokit/Helpers/AcceptHeaders.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Octokit/Helpers/AcceptHeaders.cs b/Octokit/Helpers/AcceptHeaders.cs index dfb37c0ec3..169fed930c 100644 --- a/Octokit/Helpers/AcceptHeaders.cs +++ b/Octokit/Helpers/AcceptHeaders.cs @@ -34,5 +34,7 @@ public static class AcceptHeaders public const string GpgKeysPreview = "application/vnd.github.cryptographer-preview"; public const string DeploymentApiPreview = "application/vnd.github.ant-man-preview+json"; + + public const string PagesApiPreview = "application/vnd.github.mister-fantastic-preview+json"; } } From 1b469dc3fe5e498c0b3b353ea18360bb151725aa Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Thu, 14 Jul 2016 20:58:45 +0700 Subject: [PATCH 4/9] fixed accept headers --- Octokit/Clients/RepositoryPagesClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Octokit/Clients/RepositoryPagesClient.cs b/Octokit/Clients/RepositoryPagesClient.cs index 007d682d74..f5a37f00a7 100644 --- a/Octokit/Clients/RepositoryPagesClient.cs +++ b/Octokit/Clients/RepositoryPagesClient.cs @@ -151,7 +151,7 @@ public Task RequestPageBuild(string owner, string name) Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); - return ApiConnection.Post(ApiUrls.RepositoryPageBuilds(owner, name)); + return ApiConnection.Post(ApiUrls.RepositoryPageBuilds(owner, name), AcceptHeaders.PagesApiPreview); } /// @@ -163,7 +163,7 @@ public Task RequestPageBuild(string owner, string name) /// public Task RequestPageBuild(int repositoryId) { - return ApiConnection.Post(ApiUrls.RepositoryPageBuilds(repositoryId)); + return ApiConnection.Post(ApiUrls.RepositoryPageBuilds(repositoryId), AcceptHeaders.PagesApiPreview); } } } From d83342fdbf031a79db1ca8da262f10077b789f25 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Thu, 14 Jul 2016 20:59:36 +0700 Subject: [PATCH 5/9] added new unit tests --- .../Clients/RepositoryPagesClientTests.cs | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Octokit.Tests/Clients/RepositoryPagesClientTests.cs b/Octokit.Tests/Clients/RepositoryPagesClientTests.cs index 1addcc7af6..a81d0a3856 100644 --- a/Octokit.Tests/Clients/RepositoryPagesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoryPagesClientTests.cs @@ -49,6 +49,9 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.Get(null, "name")); await Assert.ThrowsAsync(() => client.Get("owner", null)); + + await Assert.ThrowsAsync(() => client.Get("", "name")); + await Assert.ThrowsAsync(() => client.Get("owner", "")); } } @@ -161,6 +164,47 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.GetLatest(null, "name")); await Assert.ThrowsAsync(() => client.GetLatest("owner", null)); + + await Assert.ThrowsAsync(() => client.GetLatest("", "name")); + await Assert.ThrowsAsync(() => client.GetLatest("owner", "")); + } + } + + public class TheRequestPageBuildMethod + { + [Fact] + public async Task PostsToCorrectUrl() + { + var connection = Substitute.For(); + var client = new RepositoryPagesClient(connection); + + await client.RequestPageBuild("fake", "repo"); + + connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/pages/builds"), "application/vnd.github.mister-fantastic-preview+json"); + } + + [Fact] + public async Task PostsToCorrectUrlWithRepositoryId() + { + var connection = Substitute.For(); + var client = new RepositoryPagesClient(connection); + + await client.RequestPageBuild(1); + + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/pages/builds"), "application/vnd.github.mister-fantastic-preview+json"); + } + + [Fact] + public async Task EnsuresNonNullArguments() + { + var connection = Substitute.For(); + var client = new RepositoryPagesClient(connection); + + await Assert.ThrowsAsync(() => client.RequestPageBuild(null, "name")); + await Assert.ThrowsAsync(() => client.RequestPageBuild("owner", null)); + + await Assert.ThrowsAsync(() => client.RequestPageBuild("", "name")); + await Assert.ThrowsAsync(() => client.RequestPageBuild("owner", "")); } } } From 26a49c7031948fa68b527c8196c212985bc3c80e Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Thu, 14 Jul 2016 21:04:18 +0700 Subject: [PATCH 6/9] added new unit tests for observable client --- .../ObservableRepositoryPagesClientTests.cs | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Octokit.Tests/Reactive/ObservableRepositoryPagesClientTests.cs b/Octokit.Tests/Reactive/ObservableRepositoryPagesClientTests.cs index 90ceef4346..b1e1bab414 100644 --- a/Octokit.Tests/Reactive/ObservableRepositoryPagesClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableRepositoryPagesClientTests.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using NSubstitute; using Octokit.Reactive; using Xunit; @@ -48,6 +49,9 @@ public void EnsuresNonNullArguments() Assert.Throws(() => client.Get(null, "name")); Assert.Throws(() => client.Get("owner", null)); + + Assert.Throws(() => client.Get("", "name")); + Assert.Throws(() => client.Get("owner", "")); } } @@ -160,6 +164,47 @@ public void EnsuresNonNullArguments() Assert.Throws(() => client.GetLatest(null, "name")); Assert.Throws(() => client.GetLatest("owner", null)); + + Assert.Throws(() => client.GetLatest("", "name")); + Assert.Throws(() => client.GetLatest("owner", "")); + } + } + + public class TheRequestPageBuildMethod + { + [Fact] + public async Task PostsToCorrectUrl() + { + var gitHubClient = Substitute.For(); + var client = new ObservableRepositoryPagesClient(gitHubClient); + + client.RequestPageBuild("fake", "repo"); + + gitHubClient.Received().Repository.Page.RequestPageBuild("fake", "repo"); + } + + [Fact] + public async Task PostsToCorrectUrlWithRepositoryId() + { + var gitHubClient = Substitute.For(); + var client = new ObservableRepositoryPagesClient(gitHubClient); + + client.RequestPageBuild(1); + + gitHubClient.Received().Repository.Page.RequestPageBuild(1); + } + + [Fact] + public async Task EnsuresNonNullArguments() + { + var gitHubClient = Substitute.For(); + var client = new ObservableRepositoryPagesClient(gitHubClient); + + Assert.Throws(() => client.RequestPageBuild(null, "name")); + Assert.Throws(() => client.RequestPageBuild("owner", null)); + + Assert.Throws(() => client.RequestPageBuild("", "name")); + Assert.Throws(() => client.RequestPageBuild("owner", "")); } } } From 992ff0dad46d627363dec8829f71834151fa8dce Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Sun, 17 Jul 2016 11:34:02 +0700 Subject: [PATCH 7/9] fixed errors in tests --- Octokit.Tests/Clients/RepositoryPagesClientTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Octokit.Tests/Clients/RepositoryPagesClientTests.cs b/Octokit.Tests/Clients/RepositoryPagesClientTests.cs index a81d0a3856..0e7fbfcfa6 100644 --- a/Octokit.Tests/Clients/RepositoryPagesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoryPagesClientTests.cs @@ -50,8 +50,8 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.Get(null, "name")); await Assert.ThrowsAsync(() => client.Get("owner", null)); - await Assert.ThrowsAsync(() => client.Get("", "name")); - await Assert.ThrowsAsync(() => client.Get("owner", "")); + await Assert.ThrowsAsync(() => client.Get("", "name")); + await Assert.ThrowsAsync(() => client.Get("owner", "")); } } @@ -165,8 +165,8 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.GetLatest(null, "name")); await Assert.ThrowsAsync(() => client.GetLatest("owner", null)); - await Assert.ThrowsAsync(() => client.GetLatest("", "name")); - await Assert.ThrowsAsync(() => client.GetLatest("owner", "")); + await Assert.ThrowsAsync(() => client.GetLatest("", "name")); + await Assert.ThrowsAsync(() => client.GetLatest("owner", "")); } } From b6cca1082ed0698be849c58f1f43419c7012850b Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Sun, 17 Jul 2016 16:09:46 +0700 Subject: [PATCH 8/9] ID to Id in comments --- .../Clients/IObservableRepositoryPagesClient.cs | 10 +++++----- .../Clients/ObservableRepositoryPagesClient.cs | 10 +++++----- Octokit/Clients/IRepositoryPagesClient.cs | 10 +++++----- Octokit/Clients/RepositoryPagesClient.cs | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs index 9b135efe73..fab7b1e556 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoryPagesClient.cs @@ -25,7 +25,7 @@ public interface IObservableRepositoryPagesClient /// /// Gets the page metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -45,7 +45,7 @@ public interface IObservableRepositoryPagesClient /// /// Gets all build metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -65,7 +65,7 @@ public interface IObservableRepositoryPagesClient /// /// Gets all build metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// Options to change the API response /// /// See the API documentation for more information. @@ -85,7 +85,7 @@ public interface IObservableRepositoryPagesClient /// /// Gets the build metadata for the last build for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -104,7 +104,7 @@ public interface IObservableRepositoryPagesClient /// /// Requests your site be built from the latest revision on the default branch for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// diff --git a/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs index 8fd6cca0d9..08afa26f78 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoryPagesClient.cs @@ -44,7 +44,7 @@ public IObservable Get(string owner, string name) /// /// Gets the page metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -72,7 +72,7 @@ public IObservable GetAll(string owner, string name) /// /// Gets all build metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -102,7 +102,7 @@ public IObservable GetAll(string owner, string name, ApiOptions opti /// /// Gets all build metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// Options to change the API response /// /// See the API documentation for more information. @@ -133,7 +133,7 @@ public IObservable GetLatest(string owner, string name) /// /// Gets the build metadata for the last build for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -161,7 +161,7 @@ public IObservable RequestPageBuild(string owner, string name) /// /// Requests your site be built from the latest revision on the default branch for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// diff --git a/Octokit/Clients/IRepositoryPagesClient.cs b/Octokit/Clients/IRepositoryPagesClient.cs index 3db7fc25b3..614abd2717 100644 --- a/Octokit/Clients/IRepositoryPagesClient.cs +++ b/Octokit/Clients/IRepositoryPagesClient.cs @@ -26,7 +26,7 @@ public interface IRepositoryPagesClient /// /// Gets the page metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -46,7 +46,7 @@ public interface IRepositoryPagesClient /// /// Gets all build metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -66,7 +66,7 @@ public interface IRepositoryPagesClient /// /// Gets all build metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// Options to change the API response /// /// See the API documentation for more information. @@ -86,7 +86,7 @@ public interface IRepositoryPagesClient /// /// Gets the build metadata for the last build for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -105,7 +105,7 @@ public interface IRepositoryPagesClient /// /// Requests your site be built from the latest revision on the default branch for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// diff --git a/Octokit/Clients/RepositoryPagesClient.cs b/Octokit/Clients/RepositoryPagesClient.cs index f5a37f00a7..808e43073c 100644 --- a/Octokit/Clients/RepositoryPagesClient.cs +++ b/Octokit/Clients/RepositoryPagesClient.cs @@ -38,7 +38,7 @@ public Task Get(string owner, string name) /// /// Gets the page metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -66,7 +66,7 @@ public Task> GetAll(string owner, string name) /// /// Gets all build metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -97,7 +97,7 @@ public Task> GetAll(string owner, string name, ApiOpti /// /// Gets all build metadata for a given repository /// - /// The ID of the repository + /// The Id of the repository /// Options to change the API response /// /// See the API documentation for more information. @@ -129,7 +129,7 @@ public Task GetLatest(string owner, string name) /// /// Gets the build metadata for the last build for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// @@ -157,7 +157,7 @@ public Task RequestPageBuild(string owner, string name) /// /// Requests your site be built from the latest revision on the default branch for a given repository /// - /// The ID of the repository + /// The Id of the repository /// /// See the API documentation for more information. /// From c137d079d0fc5d35364eec3551669c8596d2d533 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Sun, 17 Jul 2016 21:17:17 +0700 Subject: [PATCH 9/9] removed exxtra async --- .../Reactive/ObservableRepositoryPagesClientTests.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Octokit.Tests/Reactive/ObservableRepositoryPagesClientTests.cs b/Octokit.Tests/Reactive/ObservableRepositoryPagesClientTests.cs index b1e1bab414..a0fe1e78e1 100644 --- a/Octokit.Tests/Reactive/ObservableRepositoryPagesClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableRepositoryPagesClientTests.cs @@ -1,5 +1,4 @@ using System; -using System.Threading.Tasks; using NSubstitute; using Octokit.Reactive; using Xunit; @@ -173,7 +172,7 @@ public void EnsuresNonNullArguments() public class TheRequestPageBuildMethod { [Fact] - public async Task PostsToCorrectUrl() + public void PostsToCorrectUrl() { var gitHubClient = Substitute.For(); var client = new ObservableRepositoryPagesClient(gitHubClient); @@ -184,7 +183,7 @@ public async Task PostsToCorrectUrl() } [Fact] - public async Task PostsToCorrectUrlWithRepositoryId() + public void PostsToCorrectUrlWithRepositoryId() { var gitHubClient = Substitute.For(); var client = new ObservableRepositoryPagesClient(gitHubClient); @@ -195,7 +194,7 @@ public async Task PostsToCorrectUrlWithRepositoryId() } [Fact] - public async Task EnsuresNonNullArguments() + public void EnsuresNonNullArguments() { var gitHubClient = Substitute.For(); var client = new ObservableRepositoryPagesClient(gitHubClient);