Example #1
0
 public void ShouldCalculateCorrectChargeForRegularMovie()
 {
     Assert.AreEqual(2.00m, RegularPriceInstance.GetCharge(1));
     Assert.AreEqual(2.00m, RegularPriceInstance.GetCharge(2));
     Assert.AreEqual(3.50m, RegularPriceInstance.GetCharge(3));
     Assert.AreEqual(5.00m, RegularPriceInstance.GetCharge(4));
 }
 public void ShouldCalculateCorrectChargeForChildrensMovie()
 {
     Assert.AreEqual(1.5, CHILDRENS_PRICE.GetCharge(1));
     Assert.AreEqual(1.5, CHILDRENS_PRICE.GetCharge(2));
     Assert.AreEqual(1.5, CHILDRENS_PRICE.GetCharge(3));
     Assert.AreEqual(3.0, CHILDRENS_PRICE.GetCharge(4));
     Assert.AreEqual(4.5, CHILDRENS_PRICE.GetCharge(5));
 }
Example #3
0
 public void ShouldCalculateCorrectChargeForNewRelease()
 {
     Assert.AreEqual(3.0, NewReleasePriceInstance.GetCharge(1));
     Assert.AreEqual(6.0, NewReleasePriceInstance.GetCharge(2));
     Assert.AreEqual(9.0, NewReleasePriceInstance.GetCharge(3));
 }
 public double GetCharge(int daysRented)
 {
     return(_price.GetCharge(daysRented));
 }