public Get ( long repositoryId ) : Task |
||
repositoryId | long | The Id of the repository |
return | Task |
public async Task EnsuresNonNullArguments() { var client = new RepositoriesClient(Substitute.For<IApiConnection>()); await AssertEx.Throws<ArgumentNullException>(async () => await client.Get(null, "name")); await AssertEx.Throws<ArgumentNullException>(async () => await client.Get("owner", null)); }
public void RequestsCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new RepositoriesClient(connection); client.Get("fake", "repo"); connection.Received().Get<Repository>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo"), null); }