public void Should_Return_Statement_For_New_Release_Film_Rentel() { var movie = new NewReleaseMovie("PirateDesCaraibe"); var rental = new Rental(movie, 3); var customer = new Customer("Maher"); customer.AddRental(rental); //var expected = "Rental Record for Maher\n" + // "\tPirateDesCaraibe\t9\n"+ // "Amount owed is 9\n" + // "You earned 2 frequent renter points"; var expected = "Rental Record for Maher\n\tPirateDesCaraibe\t9\nAmount owed is 9\nYou earned 2 frequent renter points"; var actualStaement = customer.Statement(); Assert.AreEqual(expected, actualStaement); }
public void CustomerCreateCorrectStatement() { Customer customer = new Customer("Bug"); var movie1 = new ChildrenMovie("Angry Birds", Rental.ChildrenBaseAmount); Rental rental1 = new Rental(movie1, 2); customer.AddRental(rental1); var movie2 = new NewReleaseMovie("StarWar", Rental.NewReleaseBaseAmount); Rental rental2 = new Rental(movie2, 10); customer.AddRental(rental2); var movie3 = new RegularMovie("Hatico", Rental.RegularBaseAmount); Rental rental3 = new Rental(movie3, 4); customer.AddRental(rental3); string actual = customer.Statement(); Assert.AreEqual("учет аренды для Bug\n\tAngry Birds\t15\n\tStarWar\t30\n\tHatico\t32\nСумма задолженности составляет 77\nВы заработали 4 очков за активность", actual); }
public void TypeFilmShouldBeCorrect() { Movie movie = new NewReleaseMovie("Rio2"); Assert.AreEqual(MovieType.NEW_RELEASE, movie.type); }
public void NameFilmShouldBeCorrect() { Movie movie = new NewReleaseMovie("Rio2"); Assert.AreEqual("Rio2", movie.title); }