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

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

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

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

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

                client.GetProtectedBranchTeamRestrictions(1, "branch");

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