public GetAllForOrg ( string organization ) : Task |
||
organization | string | |
Результат | Task |
public void EnsuresNonNullArguments() { var reposEndpoint = new RepositoriesClient(Substitute.For<IApiConnection>()); Assert.Throws<ArgumentNullException>(() => reposEndpoint.GetAllForOrg(null)); }
public void RequestsTheCorrectUrlAndReturnsOrganizations() { var connection = Substitute.For<IApiConnection>(); var client = new RepositoriesClient(connection); client.GetAllForOrg("orgname"); connection.Received() .GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "orgs/orgname/repos")); }