package com.zipcoder.payment; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; public class PaymentPresenterTest { @Test public void TestingtoString(){ Payment[] payments = new Payment[0]; PaymentPresenter presenter = new PaymentPresenter(); String expected = ""; String actual = presenter.toString(payments); assertEquals(expected, actual); } @Test public void multiplepayments() { Payment[] payments = new Payment[2]; Payment paypal = new PayPal(4L, "Tia Mowry", "tia@mowry.com"); Payment check = new Check(81L, "Tia Mowry", "11432543", "134344551"); payment[0] = paypal; payment[1] = check; PaymentPresenter presenter = new PaymentPresenter(); String expected = "Check Tia Mowry ***4551\nPaypal Tia Mowry tia@mowry.com\n"; String actual = presenter.toString(payments); assertEquals(expected, actual); } }