import { MockDaffProductFacade } from '@daffodil/product/state/testing'
@Injectable()
class MockDaffProductFacade implements DaffProductFacadeInterface {
getProduct(id: string): BehaviorSubject<DaffProduct>
getPrice(id: string): BehaviorSubject<number>
hasDiscount(id: string): BehaviorSubject<boolean>
getDiscountAmount(id: string): BehaviorSubject<number>
getDiscountedPrice(id: string): BehaviorSubject<number>
getDiscountPercent(id: string): BehaviorSubject<number>
isOutOfStock(id: string): BehaviorSubject<boolean>
dispatch(action): void
}
BehaviorSubject<DaffProduct>
Get a product.
Parameter | id: string |
---|---|
Description |
BehaviorSubject<number>
Get the original price for a product.
Parameter | id: string |
---|---|
Description |
BehaviorSubject<boolean>
Whether a particular product has a discount.
Parameter | id: string |
---|---|
Description |
BehaviorSubject<number>
Get the discount amount of a product.
Parameter | id: string |
---|---|
Description |
BehaviorSubject<number>
Get the discounted price for a product.
Parameter | id: string |
---|---|
Description |
BehaviorSubject<number>
Get the discount percent of a product.
Parameter | id: string |
---|---|
Description |
BehaviorSubject<boolean>
Whether a product is out of stock.
Parameter | id: string |
---|---|
Description |
void
Parameter | action: undefined |
---|---|
Description |