public GetAllTags ( long repositoryId ) : Task |
||
repositoryId | long | The Id of the repository |
return | Task |
public void EnsuresNonNullArguments() { var client = new RepositoriesClient(Substitute.For<IApiConnection>()); Assert.Throws<ArgumentNullException>(() => client.GetAllTags(null, "repo")); Assert.Throws<ArgumentNullException>(() => client.GetAllTags("owner", null)); Assert.Throws<ArgumentException>(() => client.GetAllTags("", "repo")); Assert.Throws<ArgumentException>(() => client.GetAllTags("owner", "")); }
public void GetsCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new RepositoriesClient(connection); client.GetAllTags("owner", "name"); connection.Received() .GetAll<RepositoryTag>(Arg.Is<Uri>(u => u.ToString() == "repos/owner/name/tags")); }