public void OfferPriceForQtyBasedOfferWhenQtyIsZeroTest() { const decimal price = 20m; var offer = new QtyBasedOffer(0, 15m); var offerPrice = offer.OfferPrice(1, price); Assert.NotNull(offer); Assert.That(price, Is.EqualTo(offerPrice)); }
public void OfferPriceForQtyBasedOfferTest() { const int qty = 3; const decimal individualPrice = 130m; const decimal offerPrice = 100m; var offer = new QtyBasedOffer(qty, offerPrice); var price = offer.OfferPrice(qty, individualPrice); Assert.NotNull(offer); Assert.That(offerPrice, Is.EqualTo(price)); }