@Test public void test1RegularAnd1ChidrensMovieRentalsFor3Days() { CustomerRefactored cust = new CustomerRefactored("John Doe"); Movie theShining = new Movie("The Shining", Movie.REGULAR); Movie theLionKing = new Movie("The Lion King", Movie.CHILDRENS); Rentals rentals = new Rentals(cust.getName()); AbstractRental theShiningRentalFor3Days = new RegularRental(theShining, 3); rentals.add(theShiningRentalFor3Days); AbstractRental theLionKingRentalFor3Days = new ChildrensRental( theLionKing, 3); rentals.add(theLionKingRentalFor3Days); String[] movieTitles = new String[] { theShining.getTitle(), theLionKing.getTitle() }; double[] thisAmount = new double[] { 3.5d, 1.5d }; double totalAmount = 5.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();  }