MockDaffCollectionFacade
Can be used to mock out the DaffCollectionFacade
in testing environments.
import { MockDaffCollectionFacade } from '@daffodil/core/state/testing'
@Injectable()
class MockDaffCollectionFacade implements DaffCollectionFacadeInterface {
metadata$: BehaviorSubject<DaffCollectionMetadata>
request$: BehaviorSubject<DaffCollectionRequest>
count$: BehaviorSubject<number>
currentPage$: BehaviorSubject<number>
totalPages$: BehaviorSubject<number>
pageSize$: BehaviorSubject<number>
sortOptions$: BehaviorSubject<DaffSortOption[]>
appliedSortOption$: BehaviorSubject<string>
appliedSortDirection$: BehaviorSubject<DaffSortDirectionEnum>
filters$: BehaviorSubject<DaffFilters>
appliedFilters$: BehaviorSubject<DaffFilters>
dispatch(action: Action<string>)
}
Properties
Name | Type | Description |
---|---|---|
metadata$ | BehaviorSubject<DaffCollectionMetadata> | The page metadata for the collection. |
request$ | BehaviorSubject<DaffCollectionRequest> | Builds a request that matches the current collection. |
count$ | BehaviorSubject<number> | The number of items in the collection. |
currentPage$ | BehaviorSubject<number> | The current page of items for the collection. |
totalPages$ | BehaviorSubject<number> | The number of pages of items available in the collection. |
pageSize$ | BehaviorSubject<number> | The number of items per page for the collection. |
sortOptions$ | BehaviorSubject<DaffSortOption[]> | The sort options available for the items of the collection. |
appliedSortOption$ | BehaviorSubject<string> | The sort options available for the items of the collection. |
appliedSortDirection$ | BehaviorSubject<DaffSortDirectionEnum> | The sort options available for the items of the collection. |
filters$ | BehaviorSubject<DaffFilters> | The filters available for the entities of the collection. |
appliedFilters$ | BehaviorSubject<DaffFilters> | The sort options available for the entities of the collection. |
dispatch |