PayPalTest.java 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.zipcoder.payment;
  2. import org.junit.Test;
  3. import static org.junit.Assert.*;
  4. public class PayPalTest {
  5. @Test
  6. public void getSetId() {
  7. long id = 12345;
  8. long expectedId = id;
  9. PayPal payPal = new PayPal();
  10. payPal.setId(id);
  11. long actualId = payPal.getId();
  12. assertEquals(expectedId, actualId);
  13. }
  14. @Test
  15. public void getSetPayerName() {
  16. String payerName = "Tia Mowry";
  17. String expectedPayerName = payerName;
  18. PayPal payPal = new PayPal();
  19. payPal.setPayerName(payerName);
  20. String actualPayerName = payPal.getPayerName();
  21. assertEquals(expectedPayerName, actualPayerName);
  22. }
  23. @Test
  24. public void getSetEmail(){
  25. String email = "tia@mowry.com";
  26. String expectedEmail = email;
  27. PayPal payPal = new PayPal();
  28. payPal.setEmail(email);
  29. String actualEmail = payPal.getEmail();
  30. assertEquals(expectedEmail, actualEmail);
  31. }
  32. @Test
  33. public void getShortDescription() {
  34. }
  35. }