| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- package com.zipcoder.payment;
-
- import org.junit.Test;
-
- import static org.junit.Assert.assertEquals;
- import static org.junit.Assert.assertTrue;
-
- public class PayPalTest {
-
- @Test
- public void getIdTest() {
- PayPal payPal = new PayPal();
- payPal.setId(6666L);
-
- long expected = 6666;
- long actual = payPal.getId();
-
- assertEquals(expected, actual);
- }
-
- @Test
- public void getPayerNameTest() {
- PayPal payPal = new PayPal();
- payPal.setPayerName("Kris Blassingame");
-
- String expected = "Kris Blassingame";
- String actual = payPal.getPayerName();
-
- assertEquals(expected, actual);
- }
-
- @Test
- public void getEmailTest() {
- PayPal payPal = new PayPal();
- payPal.setEmail("krisblassingame@gmail.com");
-
- String expected = "krisblassingame@gmail.com";
- String actual = payPal.getEmail();
- }
-
- @Test
- public void getShortDescriptionTest() {
- PayPal payPal = new PayPal("Kris Blassingame", "krisblassingame@gmail.com");
-
- payPal.getShortDescription();
- String actual = "PayPal Kris Blassingame krisblassingame@gmail.com";
-
- assertEquals(payPal.getShortDescription(), actual);
-
-
- }
- @Test
- public void compareToTest() {
- PayPal payPal = new PayPal("Tia Mowry", "tia@mowry.com");
- Check check = new Check("Tia Mowry", "123456789", "0000123456789");
-
- assertTrue(payPal.compareTo(check) > 0);
-
- }
- }
|