public GetAllContributors ( long repositoryId ) : Task |
||
repositoryId | long | The Id of the repository |
리턴 | Task |
public void EnsuresArguments() { var client = new RepositoriesClient(Substitute.For<IApiConnection>()); Assert.Throws<ArgumentNullException>(() => client.GetAllContributors(null, "repo")); Assert.Throws<ArgumentNullException>(() => client.GetAllContributors("owner", null)); Assert.Throws<ArgumentException>(() => client.GetAllContributors("", "repo")); Assert.Throws<ArgumentException>(() => client.GetAllContributors("owner", "")); }
public void GetsCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new RepositoriesClient(connection); client.GetAllContributors("owner", "name"); connection.Received() .GetAll<User>(Arg.Is<Uri>(u => u.ToString() == "repos/owner/name/contributors"), Arg.Any<IDictionary<string, string>>()); }