public void Calculate_NegativeCount_Throws() { var pricingRule = new PriceDropOnMinimumPricingRule("productId", 2.0m, 3, 1.0m); pricingRule.Invoking(pr => pr.Calculate(-1)).Should().Throw <ArgumentException>(); }
public void CalculateTests(decimal price, int minimumCount, decimal priceAfter, int count, decimal total) { var pricingRule = new PriceDropOnMinimumPricingRule("productId", price, minimumCount, priceAfter); pricingRule.Calculate(count).Should().Be(total); }