Exemplo n.º 1
0
        public void Setup()
        {
            var offers = new Offers(new List<Offer>
                {
                    new Offer{SKU = 'A', Frequency = 3, Discount = 20},
                    new Offer{SKU = 'B', Frequency = 2, Discount = 15}
                });
            var catalogue = new Catalogue(new Dictionary<char, int> {{'A', 50}, {'B', 30}, {'C', 20}, {'D', 15}});

            _checkout = new Checkout(offers, catalogue);
        }
Exemplo n.º 2
0
 public Checkout(Offers offers, Catalogue catalogue)
 {
     _prices = catalogue;
     _offers = offers;
 }