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
 import static org.junit.Assert.*;
1
 import static org.junit.Assert.*;
2
 
2
 
3
 public class CheckbookTest {
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
     @org.junit.Before
11
     @org.junit.Before
6
     public void setUp() throws Exception {
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
     @org.junit.After
24
     @org.junit.After