import { Injectable } from '@angular/core' ; import { Observable , of , } from 'rxjs' ; import { DaffOrder , DaffCheckoutServiceInterface , } from '@daffodil/checkout' ; import { DaffOrderItemFactory } from '../../order/factories/order-item.factory' ; import { DaffOrderFactory } from '../../order/factories/order.factory' ; @ Injectable ( { providedIn : 'root' , } ) export class DaffTestingCheckoutService implements DaffCheckoutServiceInterface { constructor ( private orderFactory , private orderItemFactory ) { } placeOrder ( cartId ) { return of ( this . orderFactory . create ( { items : this . orderItemFactory . createMany ( 2 ) } ) ) ; } }