|
|
@@ -1,4 +1,33 @@
|
|
1
|
1
|
package com.zipcoder.payment;
|
|
2
|
2
|
|
|
|
3
|
+import org.junit.Assert;
|
|
|
4
|
+import org.junit.Test;
|
|
|
5
|
+
|
|
3
|
6
|
public class PaymentPresenterTest {
|
|
|
7
|
+
|
|
|
8
|
+// @Test
|
|
|
9
|
+// public void toStringEmptyTest() {
|
|
|
10
|
+// Payment[] payments = new Payment[0];
|
|
|
11
|
+// PaymentPresenter presenter = new PaymentPresenter();
|
|
|
12
|
+// String expected = "";
|
|
|
13
|
+//
|
|
|
14
|
+// String actual = presenter.toString(payments);
|
|
|
15
|
+//
|
|
|
16
|
+// Assert.assertEquals(expected, actual);
|
|
|
17
|
+// }
|
|
|
18
|
+// @Test
|
|
|
19
|
+// public void toStringTest() {
|
|
|
20
|
+// Payment[] payments = new Payment[2];
|
|
|
21
|
+// Payment paypal = new PayPal(4L, "Tia Mowry", "tia@mowry.com");
|
|
|
22
|
+// Payment check = new Check(81L, "Tia Mowry", "11432543", "134344551")
|
|
|
23
|
+//
|
|
|
24
|
+// payments[0] = paypal;
|
|
|
25
|
+// payments[1] = check;
|
|
|
26
|
+//
|
|
|
27
|
+// PaymentPresenter presenter = new PaymentPresenter();
|
|
|
28
|
+// String expected = "Check Tia Mowry ***4551\nPaypal Tia Mowry tia@mowry.com\n";
|
|
|
29
|
+//
|
|
|
30
|
+// String actual = presenter.toString(payments);
|
|
|
31
|
+// Assert.assertEquals(expected, actual);
|
|
|
32
|
+// }
|
|
4
|
33
|
}
|