import org.junit.*; /**************************************************** * MyCarTestPhase1 - to test the class Car Phase1 * * @author Resendiz * @version February 2021 ****************************************************/ public class MyHomeBuyerTest { /****************************************************** * Test default constructor - no input parameters *****************************************************/ @Test public void testConstructor() { HomeBuyer buyer = new HomeBuyer("Jon", "Smith", 650); Assert.assertEquals("Buyer's first name should be:", "Jon", buyer.getFirst()); Assert.assertEquals("Buyer's last name should be", "Smith", buyer.getLast()); Assert.assertEquals("Buyer's Credit Score should be: ", 650, buyer.getCreditScore()); } /****************************************************** * Test toString Method *****************************************************/ @Test public void testToStringMethod() { HomeBuyer buyer = new HomeBuyer("Jon", "Smith", 650); Assert.assertEquals("The toString method should be: ", "Jon Smith (Credit Score: 650)", buyer.toString()); } }