public void NonDefaultQueryBuilt() { var sut = new PipelineQueryBuilder(); string query = sut.Build( "https://https://gitlab.com/api/v4/pipelines", new PipelineQueryOptions { Ref = "feature/test", YamlErrors = true, Sha = "ff11ff11ff11ff11", Status = PipelineStatus.Failed, Scope = PipelineScope.Pending, Order = PipelineOrder.UserId, SortOrder = SortOrder.Ascending }); query.Should().Be("https://https://gitlab.com/api/v4/pipelines?" + "ref=feature%2ftest" + "&yaml_errors=true" + "&sha=ff11ff11ff11ff11" + "&status=failed" + "&scope=pending" + "&order_by=user_id" + "&sort=asc"); }
public async Task <IList <Pipeline> > GetAsync(ProjectId projectId, Action <PipelineQueryOptions> options = null) { var queryOptions = new PipelineQueryOptions(); options?.Invoke(queryOptions); string url = _queryBuilder.Build($"projects/{projectId}/pipelines", queryOptions); return(await _httpFacade.GetPagedList <Pipeline>(url)); }