Beispiel #1
0
        public void CustomerIsReadyToOrderFromAllTypesOfRestaurants()
        {
            Customer Bob     = new Customer();
            FastFood krustys = new FastFood(); //Uncomment this line after noticing what is different
            MenuItem coke    = new MenuItem();

            coke.Name = "coke";
            MenuItem lasagna = new MenuItem();

            lasagna.Name = "lasagna";
            MenuItem milkshake = new MenuItem();

            milkshake.Name = "milkshake";

            krustys.MenuItems.Add(coke);
            krustys.MenuItems.Add(lasagna);
            krustys.MenuItems.Add(milkshake);

            //The object initializer syntax used for bobsOrder is a shortcut used to set properties on an object when creating it
            Order bobsOrder = new Order
            {
                Drink   = "coke",
                Entree  = "lasagna",
                Dessert = "milkshake"
            };

            Assert.IsTrue(bobsOrder.VerifyOrderComplete());
            Assert.IsTrue(Bob.ReadyToPlaceOrder(bobsOrder, krustys));
        }
Beispiel #2
0
        public void FastFoodCanSetDriveThrough()
        {
            FastFood krustys = new FastFood();

            krustys.HasDriveThrough = true;
            Assert.IsTrue(krustys.HasDriveThrough);
        }
Beispiel #3
0
        public void FastFoodCanAddMenuItemWithNameAndPrice()
        {
            FastFood krustys = new FastFood();
            int      BeginningNumberOfMenuItems = krustys.MenuItems.Count;

            krustys.addMenuItem("Chicken Nuggets", 4.00);
            Assert.AreEqual(BeginningNumberOfMenuItems + 1, krustys.MenuItems.Count);
        }
Beispiel #4
0
 internal bool ReadyToPlaceOrder(Order bobsOrder, FastFood krustys)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
        public void FastFoodEnsureICanCreateInstance()
        {
            FastFood krustys = new FastFood();

            Assert.IsNotNull(krustys);
        }