public void BeforeEach()
        {
            _basket = new Basket();
            var shopCatalogue = new ShopCatalogue();
            var currentOffers = new CurrentOffers();

            currentOffers.RegisterDeal(new BreadAndButterDeal(), shopCatalogue.LookupPrice(new Bread()).NetPence / 2);
            currentOffers.RegisterDeal(new MultibuyMilkDeal(), shopCatalogue.LookupPrice(new Milk()).NetPence);
            _checkout = new Checkout(shopCatalogue, currentOffers);
        }
Ejemplo n.º 2
0
        public void It_returns_the_price_of_milk()
        {
            var           unit = new ShopCatalogue();
            IPurchaseable item = new Milk();

            Assert.That(unit.LookupPrice(item).AsCurrency(), Is.EqualTo(1.15));
        }