|
@@ -1,9 +1,24 @@
|
1
|
1
|
import static org.junit.Assert.*;
|
2
|
2
|
|
3
|
3
|
public class CheckbookTest {
|
|
4
|
+ Checkbook checkbook;
|
|
5
|
+ Transaction debit;
|
|
6
|
+ Transaction credit;
|
|
7
|
+ Payee payeeDebit;
|
|
8
|
+ Payee payeeCredit;
|
|
9
|
+ Payee owner;
|
4
|
10
|
|
5
|
11
|
@org.junit.Before
|
6
|
12
|
public void setUp() throws Exception {
|
|
13
|
+ this.owner = new Payee();
|
|
14
|
+ owner.setGivenName("Nick Satinover");
|
|
15
|
+ this.payeeCredit = new Payee();
|
|
16
|
+ payeeCredit.setGivenName("Credit Payee");
|
|
17
|
+ this.payeeDebit = new Payee();
|
|
18
|
+ payeeDebit.setGivenName("Debit Payee");
|
|
19
|
+ this.debit = new Transaction("This is a Debit", payeeDebit, TransactionType.DEBIT, 100.50);
|
|
20
|
+ this.credit = new Transaction("This is a Credit", payeeCredit, TransactionType.CREDIT, 100.50);
|
|
21
|
+ this.checkbook = new Checkbook(owner, 1000.00);
|
7
|
22
|
}
|
8
|
23
|
|
9
|
24
|
@org.junit.After
|