public static Customer GetCustomer() { const string customerName = "Romnaka"; var regularMovie = new RegularMovie("Harry Potter"); var childrensMovie = new ChildrensMovie("The Lion King"); var newReleaseMovie = new NewReleaseMovie("Van Helsing"); var customer = new Customer(customerName, new[] { new Rental(regularMovie, 5), new Rental(childrensMovie, 4), new Rental(newReleaseMovie, 3) }); return(customer); }
public void GetStatement_WhenCustomerHaveMultipleRentals_ShouldPass(int regularMovieDays, int childrensMovieDays, int newReleaseMovieDays, double expectedTotalAmount, int expectedFrequentRenterPoints) { const string customerName = "Romnaka"; var regularMovie = new RegularMovie("Harry Potter"); var childrensMovie = new ChildrensMovie("The Lion King"); var newReleaseMovie = new NewReleaseMovie("Van Helsing"); var customer = new Customer(customerName, new[] { new Rental(regularMovie, regularMovieDays), new Rental(childrensMovie, childrensMovieDays), new Rental(newReleaseMovie, newReleaseMovieDays) }); customer.GetStatement(new StandardFormatter()); Assert.Equal(expectedTotalAmount, customer.TotalAmount); Assert.Equal(expectedFrequentRenterPoints, customer.FrequentRenterPoints); }
public static Customer GetCustomer() { const string customerName = "Romnaka"; var regularMovie = new RegularMovie("Harry Potter"); var childrensMovie = new ChildrensMovie("The Lion King"); var newReleaseMovie = new NewReleaseMovie("Van Helsing"); var customer = new Customer(customerName, new[] { new Rental(regularMovie, 5), new Rental(childrensMovie, 4), new Rental(newReleaseMovie, 3) }); return customer; }