public void WhenGetStatement_ShouldPrintFrequentPoint() { var terminator = new Regular("Terminator"); var john = new Customer("John"); var rentOfTerminator = new Rental(terminator, 5); john.AddRental(rentOfTerminator); var statement = john.Statement(); Assert.IsTrue(statement.Contains("You earned 1"), "Should be one points"); }
public void WhenGetStatement_ShouldPrintMovieTitle() { var terminator = new Regular("Terminator"); var john = new Customer("John"); var rentOfTerminator = new Rental(terminator, 5); john.AddRental(rentOfTerminator); var statement = john.Statement(); Assert.IsTrue(statement.Contains(terminator.Title)); }
public void WhenGetStatement_ShouldPrintCustomerName() { var terminator = new Regular("Terminator"); var john = new Customer("John"); var rentOfTerminator = new Rental(terminator, 5); john.AddRental(rentOfTerminator); var statement = john.Statement(); Assert.IsTrue(statement.Contains("Rental Record for " + john.GetName())); }
public void WhenGetStatement_ShouldPrintFrequentPoints() { var terminator = new Regular("Terminator"); var xmen = new NewRelease("Xmen"); var john = new Customer("John"); var rentOfTerminator = new Rental(terminator, 5); var rentOfXmen = new Rental(xmen, 3); john.AddRental(rentOfTerminator); john.AddRental(rentOfXmen); var statement = john.Statement(); Assert.IsTrue(statement.Contains("You earned 3 "), "Frequent point should be 3"); }
public void WhenRentMovies_ShouldGiveRightStatement() { var terminator = new Regular("Terminator"); var xmen = new NewRelease("Xmen"); var john = new Customer("John"); var rentOfTerminator = new Rental(terminator, 5); var rentOfXmen = new Rental(xmen, 3); john.AddRental(rentOfTerminator); john.AddRental(rentOfXmen); var statement = john.Statement(); Assert.IsTrue(statement.Contains("Amount owed is 15.5")); }
public void WhenRentMovies_ShouldCalculateRentalAmount() { var terminator = new Regular("Terminator"); var xmen = new NewRelease("Xmen"); Assert.AreEqual(9, xmen.CalculatePrice(3)); Assert.AreEqual(6.5, terminator.CalculatePrice(5)); }
public void WhenRentRegularMovie_ShouldGiveRightStatement() { var terminator = new Regular("Terminator"); var john = new Customer("John"); var rentOfTerminator = new Rental(terminator, 5); john.AddRental(rentOfTerminator); var statement = john.Statement(); Assert.IsTrue(statement.Contains("Amount owed is 6.5")); }
public void WhenRentMovie_ShouldGetOnePoint() { var terminator = new Regular("Terminator"); var rentOfTerminator = new Rental(terminator, 5); Assert.AreEqual(1, rentOfTerminator.Movie.CalculateFrequentRenterPoints(5), "Frequent point should be 1"); }