Nick Satinover 6 年前
父节点
当前提交
d56c4a8dbe
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15
    0
      Checkbook/src/test/java/CheckbookTest.java

+ 15
- 0
Checkbook/src/test/java/CheckbookTest.java 查看文件

@@ -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