public GetAllForUser ( string login ) : Task |
||
login | string | The account name to search for |
return | Task |
public void EnsuresNonNullArguments() { var reposEndpoint = new RepositoriesClient(Substitute.For<IApiConnection>()); Assert.Throws<ArgumentNullException>(() => reposEndpoint.GetAllForUser(null)); }
public void RequestsTheCorrectUrlAndReturnsOrganizations() { var connection = Substitute.For<IApiConnection>(); var client = new RepositoriesClient(connection); client.GetAllForUser("username"); connection.Received() .GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "users/username/repos")); }