|
|
@@ -4,11 +4,11 @@ import org.junit.Test;
|
|
4
|
4
|
import static org.junit.Assert.*;
|
|
5
|
5
|
|
|
6
|
6
|
|
|
7
|
|
-public class PaymentPresenterTest1 {
|
|
|
7
|
+public class PaymentPresenterTest {
|
|
8
|
8
|
|
|
9
|
9
|
@Test
|
|
10
|
10
|
public void toString1() {
|
|
11
|
|
- Payment[] payments = new payment.Payment[0];
|
|
|
11
|
+ Payment[] payments = new Payment[0];
|
|
12
|
12
|
PaymentPresenter presenter = new PaymentPresenter();
|
|
13
|
13
|
String expected = "";
|
|
14
|
14
|
|
|
|
@@ -19,12 +19,12 @@ public class PaymentPresenterTest1 {
|
|
19
|
19
|
|
|
20
|
20
|
@Test
|
|
21
|
21
|
public void toString2(){
|
|
22
|
|
- Payment[] payments = new com.zipcoder.payment.Payment[2];
|
|
23
|
|
- Payment payPal = new PayPayl(4L, "Tia Mowry", "tia@mowry.com");
|
|
24
|
|
- Payment check = new Check(81L, "Tia Mowry", "11432543", "134344551")
|
|
|
22
|
+ Payment[] payments = new Payment[2];
|
|
|
23
|
+ Payment PayPal = new PayPal(4L, "Tia Mowry", "tia@mowry.com");
|
|
|
24
|
+ Payment check = new Check(81L, "Tia Mowry", "11432543", "134344551");
|
|
25
|
25
|
|
|
26
|
|
- payment[0] = payPal;
|
|
27
|
|
- payment[1] = check;
|
|
|
26
|
+ payments[0] = PayPal;
|
|
|
27
|
+ payments[1] = check;
|
|
28
|
28
|
|
|
29
|
29
|
PaymentPresenter presenter = new PaymentPresenter();
|
|
30
|
30
|
String expected = "Check Tia Mowry ***4551\nPaypal Tia Mowry tia@mowry.com\n";
|
|
|
@@ -35,12 +35,12 @@ public class PaymentPresenterTest1 {
|
|
35
|
35
|
|
|
36
|
36
|
@Test
|
|
37
|
37
|
public void toStringByPayerName() {
|
|
38
|
|
- Payment[] payments = new com.zipcoder.payment.Payment[2];
|
|
39
|
|
- Payment paypal = new PayPayl(4L, "Tamara Mowry", "tamara@mowry.com");
|
|
40
|
|
- Payment check = new Check(81L, "Tia Mowry", "11432543", "134344551")
|
|
|
38
|
+ Payment[] payments = new Payment[2];
|
|
|
39
|
+ Payment paypal = new PayPal(4L, "Tamara Mowry", "tamara@mowry.com");
|
|
|
40
|
+ Payment check = new Check(81L, "Tia Mowry", "11432543", "134344551");
|
|
41
|
41
|
|
|
42
|
|
- payment[0] = paypal;
|
|
43
|
|
- payment[1] = check;
|
|
|
42
|
+ payments[0] = paypal;
|
|
|
43
|
+ payments[1] = check;
|
|
44
|
44
|
|
|
45
|
45
|
PaymentPresenter presenter = new PaymentPresenter();
|
|
46
|
46
|
String expected = "Paypal Tamara Mowry tamara@mowry.com\nCheck Tia Mowry ***4551\n";
|
|
|
@@ -51,12 +51,12 @@ public class PaymentPresenterTest1 {
|
|
51
|
51
|
|
|
52
|
52
|
@Test
|
|
53
|
53
|
public void toStringById(){
|
|
54
|
|
- Payment[] payments = new com.zipcoder.payment.Payment[2];
|
|
55
|
|
- Payment paypal = new PayPayl(120L, "Tamara Mowry", "tamara@mowry.com");
|
|
56
|
|
- Payment check = new Check(81L, "Tia Mowry", "11432543", "134344551")
|
|
|
54
|
+ Payment[] payments = new Payment[2];
|
|
|
55
|
+ Payment paypal = new PayPal(120L, "Tamara Mowry", "tamara@mowry.com");
|
|
|
56
|
+ Payment check = new Check(81L, "Tia Mowry", "11432543", "134344551");
|
|
57
|
57
|
|
|
58
|
|
- payment[0] = paypal;
|
|
59
|
|
- payment[1] = check;
|
|
|
58
|
+ payments[0] = paypal;
|
|
|
59
|
+ payments[1] = check;
|
|
60
|
60
|
|
|
61
|
61
|
PaymentPresenter presenter = new PaymentPresenter();
|
|
62
|
62
|
String expected = "Paypal Tamara Mowry tamara@mowry.com\nCheck Tia Mowry ***4551\n";
|