public async Task EnsuresNonNullArguments()
            {
                var client = new ObservableRepositoryBranchesClient(Substitute.For<IGitHubClient>());

                Assert.Throws<ArgumentNullException>(() => client.GetProtectedBranchRestrictions(null, "repo", "branch"));
                Assert.Throws<ArgumentNullException>(() => client.GetProtectedBranchRestrictions("owner", null, "branch"));
                Assert.Throws<ArgumentNullException>(() => client.GetProtectedBranchRestrictions("owner", "repo", null));

                Assert.Throws<ArgumentNullException>(() => client.GetProtectedBranchRestrictions(1, null));

                Assert.Throws<ArgumentException>(() => client.GetProtectedBranchRestrictions("", "repo", "branch"));
                Assert.Throws<ArgumentException>(() => client.GetProtectedBranchRestrictions("owner", "", "branch"));
                Assert.Throws<ArgumentException>(() => client.GetProtectedBranchRestrictions("owner", "repo", ""));

                Assert.Throws<ArgumentException>(() => client.GetProtectedBranchRestrictions(1, ""));
            }
            public void RequestsTheCorrectUrlWithRepositoryId()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableRepositoryBranchesClient(gitHubClient);

                client.GetProtectedBranchRestrictions(1, "branch");

                gitHubClient.Repository.Branch.Received()
                    .GetProtectedBranchRestrictions(1, "branch");
            }