@Test public void testNewMovieRentalFor5Days() { CustomerRefactored cust = new CustomerRefactored("John Doe"); Movie tdkRises = new Movie("The Dark Knight Rises", Movie.NEW_RELEASE); Rentals rentals = new Rentals(cust.getName()); AbstractRental tdkRisesRentalFor5Days = new NewReleaseRental(tdkRises, 5); rentals.add(tdkRisesRentalFor5Days); String[] movieTitles = new String[] { tdkRises.getTitle() }; double[] thisAmount = new double[] { 15.0d }; double totalAmount = 15.0d; int frequentRenterPoints = 2; 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();  }