Example #1
0
        public void ShouldServerJuice_WhenJuiceIsSelected()
        {
            RecipeBook recipeBook = new RecipeBook(_consoleWriter);

            recipeBook.MakeRecipe("juice");
            Debug.Assert(_consoleWriter.GetOutputBuffer() == "Here you go! Fresh and nice juice.");
        }
Example #2
0
        public void ShouldNotInvokeAnyMethod_WhenInputIsInvalid(string input)
        {
            RecipeBook recipeBook = new RecipeBook(_consoleWriter);

            _consoleWriter.SetInputBuffer(input);
            recipeBook.MakeRecipe("beer");

            Debug.Assert(_consoleWriter.GetOutputBuffer() == "Input not valid");
        }
Example #3
0
        public void ShouldNotServerBeer_WhenClientIsBelow18()
        {
            RecipeBook recipeBook = new RecipeBook(_consoleWriter);

            _consoleWriter.SetInputBuffer("17");
            recipeBook.MakeRecipe("beer");

            Debug.Assert(_consoleWriter.GetOutputBuffer() == "Sorry but are not older to order a beer.");
        }
Example #4
0
        public void ShouldServerBeer_WhenClientIsAbove18()
        {
            RecipeBook recipeBook = new RecipeBook(_consoleWriter);

            _consoleWriter.SetInputBuffer("20");
            recipeBook.MakeRecipe("beer");

            Debug.Assert(_consoleWriter.GetOutputBuffer() == "Here you go! Cold beer.");
        }
Example #5
0
        public void ShouldThrownException_WhenInputAnInvalidDrink()
        {
            RecipeBook recipeBook = new RecipeBook(_consoleWriter);

            recipeBook.MakeRecipe("invalidDrink");
        }