public void Should_correct_set_take_and_skip_filter_when_use_builder() { var filter = new DocflowFilterBuilder(); filter.CreateFilter().SetSkip(Skip); filter.CreateFilter().SetTake(Take); filter.Should().NotBeNull(); }
public void Should_create_an_empty_filter_when_when_builder_does_not_specify_anything() { var docflowFilterBuilder = new DocflowFilterBuilder(); var docflowFilter = docflowFilterBuilder.CreateFilter(); ShouldHaveExpectedQueryParameters(docflowFilter, Array.Empty <(string name, string value)>()); }
internal static IEntityList <IDocflow> DocflowsList( IExternHttpClient apiClient, Guid accountId, Guid docflowId, Guid documentId, DocflowFilterBuilder?filterBuilder, LoadPage loadPage) { var docflowFilter = filterBuilder?.CreateFilter() ?? new DocflowFilter(); return(new EntityList <IDocflow>( async(skip, take, timeout) => { docflowFilter.SetSkip(skip); docflowFilter.SetTake(take); var relatedDocflows = await loadPage(apiClient, accountId, docflowId, documentId, docflowFilter, timeout).ConfigureAwait(false); return (relatedDocflows.DocflowsPageItem, relatedDocflows.TotalCount); })); }