public Delete ( long repositoryId ) : System.Threading.Tasks.Task | ||
repositoryId | long | The Id of the repository |
Résultat | System.Threading.Tasks.Task |
public async Task RequestsCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new RepositoriesClient(connection); await client.Delete("theOwner", "theRepoName"); connection.Received().Delete(Arg.Is<Uri>(u => u.ToString() == "repos/theOwner/theRepoName")); }
public async Task EnsuresNonNullArguments() { var client = new RepositoriesClient(Substitute.For<IApiConnection>()); await AssertEx.Throws<ArgumentNullException>(async () => await client.Delete(null, "aRepoName")); await AssertEx.Throws<ArgumentNullException>(async () => await client.Delete("anOwner", null)); }