public ObservableRepositoriesClient(IGitHubClient client) { Ensure.ArgumentNotNull(client, nameof(client)); _client = client.Repository; _connection = client.Connection; Status = new ObservableCommitStatusClient(client); Hooks = new ObservableRepositoryHooksClient(client); Forks = new ObservableRepositoryForksClient(client); Collaborator = new ObservableRepoCollaboratorsClient(client); Deployment = new ObservableDeploymentsClient(client); Statistics = new ObservableStatisticsClient(client); PullRequest = new ObservablePullRequestsClient(client); Branch = new ObservableRepositoryBranchesClient(client); Comment = new ObservableRepositoryCommentsClient(client); Commit = new ObservableRepositoryCommitsClient(client); Release = new ObservableReleasesClient(client); DeployKeys = new ObservableRepositoryDeployKeysClient(client); Content = new ObservableRepositoryContentsClient(client); Merging = new ObservableMergingClient(client); Page = new ObservableRepositoryPagesClient(client); Invitation = new ObservableRepositoryInvitationsClient(client); Traffic = new ObservableRepositoryTrafficClient(client); Project = new ObservableProjectsClient(client); }
public ObservableRepositoriesClient(IGitHubClient client) { Ensure.ArgumentNotNull(client, "client"); _client = client.Repository; _connection = client.Connection; Status = new ObservableCommitStatusClient(client); Hooks = new ObservableRepositoryHooksClient(client); Forks = new ObservableRepositoryForksClient(client); #pragma warning disable CS0618 // Type or member is obsolete RepoCollaborators = new ObservableRepoCollaboratorsClient(client); #pragma warning restore CS0618 // Type or member is obsolete Collaborator = new ObservableRepoCollaboratorsClient(client); Deployment = new ObservableDeploymentsClient(client); Statistics = new ObservableStatisticsClient(client); PullRequest = new ObservablePullRequestsClient(client); #pragma warning disable CS0618 // Type or member is obsolete RepositoryComments = new ObservableRepositoryCommentsClient(client); #pragma warning restore CS0618 // Type or member is obsolete Comment = new ObservableRepositoryCommentsClient(client); #pragma warning disable CS0618 // Type or member is obsolete Commits = new ObservableRepositoryCommitsClient(client); #pragma warning restore CS0618 // Type or member is obsolete Commit = new ObservableRepositoryCommitsClient(client); Release = new ObservableReleasesClient(client); DeployKeys = new ObservableRepositoryDeployKeysClient(client); Content = new ObservableRepositoryContentsClient(client); Merging = new ObservableMergingClient(client); Page = new ObservableRepositoryPagesClient(client); }
public void RequestsTheCorrectUrlWithRepositoryId() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservableMergingClient(gitHubClient); var newMerge = new NewMerge("baseBranch", "shaToMerge") { CommitMessage = "some mergingMessage" }; client.Create(1, newMerge); gitHubClient.Repository.Merging.Received(1).Create(1, newMerge); }
public async Task EnsuresNonNullArguments() { var client = new ObservableMergingClient(Substitute.For<IGitHubClient>()); var newMerge = new NewMerge("baseBranch", "shaToMerge") { CommitMessage = "some mergingMessage" }; Assert.Throws<ArgumentNullException>(() => client.Create(null, "name", newMerge)); Assert.Throws<ArgumentNullException>(() => client.Create("owner", null, newMerge)); Assert.Throws<ArgumentNullException>(() => client.Create("owner", "name", null)); Assert.Throws<ArgumentNullException>(() => client.Create(1, null)); Assert.Throws<ArgumentException>(() => client.Create("", "name", newMerge)); Assert.Throws<ArgumentException>(() => client.Create("owner", "", newMerge)); }
public ObservableRepositoriesClient(IGitHubClient client) { Ensure.ArgumentNotNull(client, "client"); _client = client.Repository; _connection = client.Connection; CommitStatus = new ObservableCommitStatusClient(client); RepoCollaborators = new ObservableRepoCollaboratorsClient(client); Deployment = new ObservableDeploymentsClient(client); Statistics = new ObservableStatisticsClient(client); PullRequest = new ObservablePullRequestsClient(client); RepositoryComments = new ObservableRepositoryCommentsClient(client); Commits = new ObservableRepositoryCommitsClient(client); DeployKeys = new ObservableRepositoryDeployKeysClient(client); Content = new ObservableRepositoryContentsClient(client); Merging = new ObservableMergingClient(client); }
public ObservableRepositoriesClient(IGitHubClient client) { Ensure.ArgumentNotNull(client, "client"); _client = client.Repository; _connection = client.Connection; Status = new ObservableCommitStatusClient(client); Hooks = new ObservableRepositoryHooksClient(client); Forks = new ObservableRepositoryForksClient(client); Collaborator = new ObservableRepoCollaboratorsClient(client); Deployment = new ObservableDeploymentsClient(client); Statistics = new ObservableStatisticsClient(client); PullRequest = new ObservablePullRequestsClient(client); Branch = new ObservableRepositoryBranchesClient(client); Comment = new ObservableRepositoryCommentsClient(client); Commit = new ObservableRepositoryCommitsClient(client); Release = new ObservableReleasesClient(client); DeployKeys = new ObservableRepositoryDeployKeysClient(client); Content = new ObservableRepositoryContentsClient(client); Merging = new ObservableMergingClient(client); Page = new ObservableRepositoryPagesClient(client); Invitation = new ObservableRepositoryInvitationsClient(client); }