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 |
BehaviorSubjectGet the original price for a product.
| Parameter | id: string |
|---|---|
| Description |
BehaviorSubjectWhether a particular product has a discount.
| Parameter | id: string |
|---|---|
| Description |
BehaviorSubjectGet the discount amount of a product.
| Parameter | id: string |
|---|---|
| Description |
BehaviorSubjectGet the discounted price for a product.
| Parameter | id: string |
|---|---|
| Description |
BehaviorSubjectGet the discount percent of a product.
| Parameter | id: string |
|---|---|
| Description |
BehaviorSubjectWhether a product is out of stock.
| Parameter | id: string |
|---|---|
| Description |
void| Parameter | action: undefined |
|---|---|
| Description |