func createOrgPaginator(t *testing.T, reqs ...testnet.TestRequest) (ts *httptest.Server, handler *testnet.TestHandler, p *paginator.OrganizationPaginator) { ts, handler = testnet.NewTLSServer(t, reqs) config := &configuration.Configuration{ AccessToken: "BEARER my_access_token", Target: ts.URL, } gateway := net.NewCloudControllerGateway() p = paginator.NewOrganizationPaginator(config, gateway) return }
func (repo CloudControllerOrganizationRepository) Paginator() paginator.Paginator { return paginator.NewOrganizationPaginator(repo.config, repo.gateway) }