示例#1
0
        static void Main()
        {
            Restaurant myRestaurant = new Restaurant();

            myRestaurant.AddPeopleIntoTheQueue("First diner waiting to be seated");
            myRestaurant.AddPeopleIntoTheQueue("Second diner waiting to be seated");
            myRestaurant.AddPeopleIntoTheQueue("Third diner waiting to be seated");
            myRestaurant.AddPeopleIntoTheQueue("Fourth diner waiting to be seated");
            myRestaurant.AddPeopleIntoTheQueue("Fifth diner waiting to be seated");


            myRestaurant.DinerHasBeenSeated();


            myRestaurant.AddPeopleIntoTheQueue("First diner seated");
            myRestaurant.AddPeopleIntoTheQueue("Second seated");
            myRestaurant.AddPeopleIntoTheQueue("Third seated");
            myRestaurant.AddPeopleIntoTheQueue("Fourth seated");
            myRestaurant.AddPeopleIntoTheQueue("Fifth seated");


            myRestaurant.AddDishesInTheDirtyStack("First table's dirty dishes");
            myRestaurant.AddDishesInTheDirtyStack("Second table's dirty dishes");
            myRestaurant.AddDishesInTheDirtyStack("Third table's dirty dishes");
            myRestaurant.AddDishesInTheDirtyStack("Fourth table's dirty dishes");
            myRestaurant.AddDishesInTheDirtyStack("Fifth table's dirty dishes");


            myRestaurant.AddDishesInTheCleanStack("First table's clean dishes");
            myRestaurant.AddDishesInTheCleanStack("Second table's clean dishes");
            myRestaurant.AddDishesInTheCleanStack("Third table's clean dishes");
            myRestaurant.AddDishesInTheCleanStack("Fourth table's clean dishes");
            myRestaurant.AddDishesInTheCleanStack("Fifth table's clean dishes");


            myRestaurant.DinerHasEatenPaidAndLeft();

            myRestaurant.WaiterHasCleanedTheTable();

            myRestaurant.ShowMeHowManyDinersIHave();

            myRestaurant.ShowMeTheActualDiners();
        }
示例#2
0
        public void AddDishesInTheCleanStack_IfItsACleanDish_ReturnsString()
        {
            Restaurant restaurant   = new Restaurant();
            string     sendVariable = "Dish 1";

            restaurant.AddPeopleIntoTheQueue("Diner 1");
            string result = restaurant.AddDishesInTheCleanStack(sendVariable);


            Assert.IsTrue(sendVariable == result);
        }