public void GivenALineDiscount_WhenAppliedToNonLine_ThenShouldReturnZero() { var sut = new LineDiscount("d", 1, 1, 1); var order = new Order(string.Empty); Assert.AreEqual(0, sut.Apply(order)); }
public void GivenALineDiscount_WhenAppliedToLine_ThenShouldReturnLineTotalTimesPercentage() { var sut = new LineDiscount("d", 1, 1, 1); var line = new Line(new Bike(string.Empty, string.Empty, 100), 2); Assert.AreEqual(line.CalculateTotal() * sut.Percentage, sut.Apply(line)); }