public void ShouldServerJuice_WhenJuiceIsSelected() { RecipeBook recipeBook = new RecipeBook(_consoleWriter); recipeBook.MakeRecipe("juice"); Debug.Assert(_consoleWriter.GetOutputBuffer() == "Here you go! Fresh and nice juice."); }
public void ShouldNotInvokeAnyMethod_WhenInputIsInvalid(string input) { RecipeBook recipeBook = new RecipeBook(_consoleWriter); _consoleWriter.SetInputBuffer(input); recipeBook.MakeRecipe("beer"); Debug.Assert(_consoleWriter.GetOutputBuffer() == "Input not valid"); }
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."); }
public void ShouldServerBeer_WhenClientIsAbove18() { RecipeBook recipeBook = new RecipeBook(_consoleWriter); _consoleWriter.SetInputBuffer("20"); recipeBook.MakeRecipe("beer"); Debug.Assert(_consoleWriter.GetOutputBuffer() == "Here you go! Cold beer."); }
public void ShouldThrownException_WhenInputAnInvalidDrink() { RecipeBook recipeBook = new RecipeBook(_consoleWriter); recipeBook.MakeRecipe("invalidDrink"); }