@Test public void testChildrensMovieRentalFor5Days() { CustomerRefactored cust = new CustomerRefactored("John Doe"); Movie theLionKing = new Movie("The Lion King", Movie.CHILDRENS); Rentals rentals = new Rentals(cust.getName()); AbstractRental theLionKingRentalFor5Days = new ChildrensRental( theLionKing, 5); rentals.add(theLionKingRentalFor5Days); String[] movieTitles = new String[] { theLionKing.getTitle() }; double[] thisAmount = new double[] { 4.5d }; double totalAmount = 4.5d; int frequentRenterPoints = 1; String expectedStatement = getRentalStatement(cust.getName(), movieTitles, thisAmount, totalAmount, frequentRenterPoints); Assert.assertEquals("Wrong statement", expectedStatement, rentals.rentalStatement()); }
public String getName() { return name; }
CustomerRefactored { public String getName() { return name; } }
CustomerRefactored { public String getName() { return name; } CustomerRefactored(String name); }
CustomerRefactored { public String getName() { return name; } CustomerRefactored(String name); String getName(); }
CustomerRefactored { public String getName() { return name; } CustomerRefactored(String name); String getName();  }