Beispiel #1
0
        public void SetPriceCodeForMovie()
        {
            Movie newMovie = new Movie("Movie Title 6: Title Rebirthed", new ChildrensMovie());
            Assert.That(2 == newMovie.type.GetPriceCode());

            newMovie.type = new RegularMovie();
            Assert.That(0 == newMovie.type.GetPriceCode());
        }
        public void CreatingAndSettingRentalData(Int32 defaultRentalDays)
        {
            Movie defaultMovie = new Movie("Test Movie 1: The Reckoning...", new ChildrensMovie());
            Rental testRental = new Rental(defaultMovie, defaultRentalDays);

            Assert.That(defaultMovie, Is.EqualTo(testRental.GetMovie()));
            Assert.That(defaultRentalDays, Is.EqualTo(testRental.GetDaysRented()));
        }
Beispiel #3
0
 public Rental(Movie movie, Int32 daysRented)
 {
     this.movie = movie;
     this.daysRented = daysRented;
 }