Пример #1
0
        public void should_apply_a_discount_when_the_order_contains_enough_products()
        {
            var checkout = new Checkout.Domain.Checkout(
                new Test.Unit.InMemoryAdapters.ItemScanner(new InMemoryProductRepository()),
                new PricingService(new InMemoryPricingRepository()));

            Assert.That(130, Is.EqualTo(checkout.TotalCostOf("AAA")));
        }
Пример #2
0
        public void Should_have_expected_total_cost_for_given_product_items(int expected, string items)
        {
            var checkout = new Checkout.Domain.Checkout(
                new Test.Unit.InMemoryAdapters.ItemScanner(new InMemoryProductRepository()),
                new PricingService(new InMemoryPricingRepository()));

            Assert.That(expected, Is.EqualTo(checkout.TotalCostOf(items)));
        }