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