public void TestMultiRental() { var m = new Movie("Taken", Movie.NewRelease); var m2 = new Movie("The Rock", Movie.Regular); var m3 = new Movie("300", Movie.NewRelease); var m4 = new Movie("Bambi", Movie.Childrens); var r = new Rental(m, 4); var r2 = new Rental(m2, 5); var r3 = new Rental(m3, 2); var r4 = new Rental(m4, 7); var c = new Customer("Eric"); c.AddRental(r); c.AddRental(r2); c.AddRental(r3); c.AddRental(r4); Assert.AreEqual(c.Statement(), "Rental Record for Eric\n\tTaken\t12\n\tThe Rock\t6.5\n\t300\t6\n\tBambi\t7.5\nAmount owed is 32\nYou earned 6 frequent renter points"); }
public void TestZeroRental() { var c = new Customer("Eric"); Assert.AreEqual(c.Statement(), "Rental Record for Eric\nAmount owed is 0\nYou earned 0 frequent renter points"); }
public void TestTwoRental() { var m = new Movie("Taken", Movie.NewRelease); var m2 = new Movie("The Rock", Movie.Regular); var r = new Rental(m, 4); var r2 = new Rental(m2, 5); var c = new Customer("Eric"); c.AddRental(r); c.AddRental(r2); Assert.AreEqual(c.Statement(), "Rental Record for Eric\n\tTaken\t12\n\tThe Rock\t6.5\nAmount owed is 18.5\nYou earned 3 frequent renter points"); }
public void TestRentRegular() { var name = "Eric"; var movieTitle = "The Shawshank Redemption"; var priceCode = Movie.Regular; var daysRented = 4; var c = new Customer(name); var m = new Movie(movieTitle, priceCode); var r = new Rental(m, daysRented); c.AddRental(r); Assert.AreEqual(c.Statement(), "Rental Record for " + name + "\n\t" + movieTitle + "\t5\nAmount owed is 5\nYou earned 1 frequent renter points"); }
public void TestRentNewRelease() { var name = "Eric"; var movieTitle = "Law Abiding Citizen"; var priceCode = Movie.NewRelease; var daysRented = 4; var c = new Customer(name); var m = new Movie(movieTitle, priceCode); var r = new Rental(m, daysRented); c.AddRental(r); Assert.AreEqual(c.Statement(), "Rental Record for " + name + "\n\t" + movieTitle + "\t12\nAmount owed is 12\nYou earned 2 frequent renter points"); }
public void TestRentChildrens() { var name = "Eric"; var movieTitle = "UP"; var priceCode = Movie.Childrens; var daysRented = 4; var c = new Customer(name); var m = new Movie(movieTitle, priceCode); var r = new Rental(m, daysRented); c.AddRental(r); Assert.AreEqual(c.Statement(), "Rental Record for " + name + "\n\t" + movieTitle + "\t3\nAmount owed is 3\nYou earned 1 frequent renter points"); }