GitHub

MagentoProductWithUpsellFactory

Model Factory

import { MagentoProductWithUpsellFactory } from '@daffodil/upsell-products/driver/magento/testing'

A factory for creating stub data for MagentoProductWithUpsells.

@Injectable()
class MagentoProductWithUpsellFactory extends DaffModelFactory<MagentoProductWithUpsell> {
  _instantiationArgs: ConstructorParameters<Klass>
  type: Constructable<DaffAccountRegistration, any[]>

  create(partial: Partial<T> = {}): T
  createMany(
    qty: number = 1
    partial: Partial<T> = {}
  ): T[]
}

() Methods

create
T
Parameters
Parameterpartial: Partial
Default{}
Description
createMany
T[]
Parameters
Parameterqty: number
Default1
Description
Parameterpartial: Partial
Default{}
Description