public void CreateMeal_returns_bag_with_one_Toy()
        {
            var toy = new Toy(ToyTypes.Doll, SamplePrice);
            _mockMealBuilder.Setup(x => x.GetToy(ToyTypes.Doll))
                .Returns(toy);

            var bag = _waiter.CreateMeal(new Order(BurgerTypes.Vegetable, DrinkTypes.Cola, ToyTypes.Doll));

            Assert.AreSame(toy, bag.Single());
        }
Example #2
0
        public void Price_returns_sum_of_all_packed_item_prices()
        {
            var burger = new Burger(BurgerTypes.Vegetable, SamplePrice);
            var drink = new Drink(DrinkTypes.Cola, SamplePrice);
            var fries = new Fries(SamplePrice);
            var bag = new Bag { burger, drink, fries };
            var toy = new Toy(ToyTypes.Car, SamplePrice);

            var mealBag = new Bag { bag, toy };

            Assert.AreEqual((burger.Price + drink.Price + fries.Price + toy.Price), mealBag.Price);
        }