PaymentPresenterTest.java 1015B

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