Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Property(Arbitrary = new[]
- {
- typeof (Generator)
- })]
- public void DiscountIsApplied_UponCheckout(decimal discount,
- decimal price)
- {
- var productRequest = new ProductRequest()
- {
- Discount = discount,
- Price = price,
- ProductId = (ProductId)1,
- Quantity = 2
- };
- var orderRequest = CreateDefaultOrderRequest(productRequest);
- var order = Order.OrderFactory.CreateFrom(Guid.NewGuid(), orderRequest);
- var amountToPay = order.Checkout();
- var expectedAmountToPay = CalculateAmountToPay(order);
- amountToPay.Should().Be(expectedAmountToPay);
- }
Add Comment
Please, Sign In to add comment