-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFixtures.java
More file actions
31 lines (24 loc) · 839 Bytes
/
Fixtures.java
File metadata and controls
31 lines (24 loc) · 839 Bytes
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
package com.payload.test;
import com.payload.pl;
import com.payload.Session;
import com.payload.arm.ARMRequest;
import com.payload.Exceptions;
import java.util.List;
import java.lang.reflect.Field;
import java.io.FileNotFoundException;
import com.github.javafaker.Faker;
public class Fixtures {
pl.Customer customer;
pl.ProcessingAccount processing_account;
Factory factory;
public Fixtures(Factory factory) throws Exception {
this.factory = factory;
Session session = factory.session;
this.customer = factory.createCustomer();
List<pl.ProcessingAccount> pas = session.select(pl.ProcessingAccount.class).all();
if (pas.size() == 0)
this.processing_account = factory.createProcessingAccount();
else
this.processing_account = pas.get(0);
}
}