public GetAllForRepository ( long repositoryId ) : Task |
||
repositoryId | long | The Id of the repository |
Résultat | Task |
public async Task EnsuresArgumentsNotNull() { var connection = Substitute.For<IApiConnection>(); var client = new IssueCommentsClient(connection); await Assert.ThrowsAsync<ArgumentNullException>(() => client.GetAllForRepository(null, "name")); await Assert.ThrowsAsync<ArgumentException>(() => client.GetAllForRepository("", "name")); await Assert.ThrowsAsync<ArgumentNullException>(() => client.GetAllForRepository("owner", null)); await Assert.ThrowsAsync<ArgumentException>(() => client.GetAllForRepository("owner", "")); }
public void RequestsCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new IssueCommentsClient(connection); client.GetAllForRepository("fake", "repo"); connection.Received().GetAll<IssueComment>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/comments")); }