public void Should_throw_ArgumentException_for_non_matching_orderitem()
            {
                var subject       = new BuyXItemsGetYPercentOff("item-1", 3, 0.25m);
                var incorrectItem = new OrderItem()
                {
                    Identifier = "item-2", ItemCost = 10m, Quantity = 1
                };

                Assert.Throws <ArgumentException>(() => subject.CalculateItemPrice(incorrectItem));
            }
            public void When_having_exactly_x_items_the_discount_should_apply_to_all_of_them()
            {
                var subject = new BuyXItemsGetYPercentOff("item-1", 3, 0.25m);
                var item    = new OrderItem {
                    Identifier = "item-1", ItemCost = 10m, Quantity = 3
                };

                var actual = subject.CalculateItemPrice(item);

                Assert.That(actual, Is.EqualTo(3 * 7.5m));
            }
            public void When_having_not_exact_sets_of_x_items_the_remaining_items_should_cost_full_price()
            {
                var subject = new BuyXItemsGetYPercentOff("item-1", 3, 0.25m);
                var item    = new OrderItem {
                    Identifier = "item-1", ItemCost = 10m, Quantity = 5
                };

                var actual = subject.CalculateItemPrice(item);

                Assert.That(actual, Is.EqualTo(3 * 7.5m + 2 * 10m));
            }