private void AplyDiscount(int bicycleCount) { var discount = Discounts.ApplyDiscount(bicycleCount); TotalPrice = TotalPrice - TotalPrice * discount.Percentage; Discounts = discount; }
public void ApllydiscountPercetageTreeBicle() { Discounts discount = new Discounts(); var result = discount.ApplyDiscount(4); Assert.AreEqual(0.30, result.Percentage); Assert.AreEqual(TypeDiscount.Family, result.TypeDiscount); }
public void ApllydiscountPercetageOneBicle() { Discounts discount = new Discounts(); var result = discount.ApplyDiscount(1); Assert.AreEqual(0, result.Percentage); Assert.AreEqual(TypeDiscount.None, result.TypeDiscount); }