-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
order-address.factory.ts
45 lines (40 loc) · 1.13 KB
/
order-address.factory.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { Injectable } from '@angular/core';
import * as faker from 'faker/locale/en_US';
import { OrderAddress } from '@daffodil/checkout';
import { DaffModelFactory } from '@daffodil/core/testing';
export class MockOrderAddress implements OrderAddress {
address_id = faker.random.number(1000);
quote_id = faker.random.number(1000);
created_at = new Date();
updated_at = new Date();
customer_id = faker.random.number(1000);
customer_address_id = faker.random.number(1000);
address_type = 'apartment';
email = 'email@email.com';
prefix = 'prefix';
firstname = 'first';
middlename = 'middle';
lastname = 'last';
suffix = 'suffix';
company = 'company';
street = 'street';
city = 'city';
state = 'state';
region = 'region';
region_id = faker.random.number(1000);
postcode = 'postcode';
country_id = 'ISO';
telephone = 'telephone';
fax = 'fax';
shipping_method = 'swallow';
shipping_description = 'flight';
shipping_rate = null;
}
@Injectable({
providedIn: 'root'
})
export class DaffOrderAddressFactory extends DaffModelFactory<OrderAddress> {
constructor(){
super(MockOrderAddress);
}
}