Esempio n. 1
0
        public void Setup()
        {
            _coffee       = new Mock <ICoffee>();
            _basicCoffee  = new Coffee();
            _withMilk     = new WithMilk(_coffee.Object);
            _withSprinkle = new WithSprinkle(_coffee.Object);

            _coffee.Setup(coffee => coffee.Cost()).Returns(1.0);
        }
Esempio n. 2
0
        public void CoffeeWithMilkAndSprinkle()
        {
            var CoffeeWithMilkAndSprinkle = new WithSprinkle(_withMilk);

            Assert.AreEqual(CoffeeWithMilkAndSprinkle.Cost(), 1.70);
        }