Repository name is required when creating a repo

I was trying to create a repository and I wasn't sure which parameters
were required. Following our philosophy of exposing required parameters
in the constructor, I change the `NewRepository` object to take in a
repository name and to make that property readonly.
This commit is contained in:
Haacked
2015-03-19 16:25:03 -07:00
parent ba9452ed3f
commit a94051d6b0
27 changed files with 75 additions and 78 deletions

View File

@@ -19,7 +19,7 @@ public class IssuesClientTests : IDisposable
_gitHubClient = Helper.GetAuthenticatedClient();
var repoName = Helper.MakeNameWithTimestamp("public-repo");
_issuesClient = _gitHubClient.Issue;
_repository = _gitHubClient.Repository.Create(new NewRepository { Name = repoName }).Result;
_repository = _gitHubClient.Repository.Create(new NewRepository(repoName)).Result;
}
[IntegrationTest]