public void RequestsTheCorrectUrlWithRepositoryId()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableRepositoryBranchesClient(gitHubClient);

                client.DeleteBranchProtection(1, "branch");

                gitHubClient.Repository.Branch.Received()
                .DeleteBranchProtection(1, "branch");
            }
            public async Task EnsuresNonNullArguments()
            {
                var client = new ObservableRepositoryBranchesClient(Substitute.For <IGitHubClient>());

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

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

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

                Assert.Throws <ArgumentException>(() => client.DeleteBranchProtection(1, ""));
            }