public void GivenChocolateSelectionShouldGenerateMessageToUI() { // Arrange _drinkBuilder.SelectDrink(new Chocolate()); _drinkBuilder.InsertMoney(0.5); // Act string result = _drinkBuilder.SendMessageToUi(); // Assert Assert.Equal("M:Drink maker makes 1 chocolate with no sugar and therefore no stick", result); }
public void GivenCorrectAmountForChocolateShouldIndicateAmountIsEnough() { // Arrange var drinkBuilder = new DrinkBuilder(new SugarService(), new MoneyAmountService()); drinkBuilder.SelectDrink(new Chocolate()); drinkBuilder.InsertMoney(0.3); drinkBuilder.InsertMoney(0.2); // Act bool result = drinkBuilder.IsAmountIsEnough; // Assert Assert.True(result); }
public void GivenBadAmountForChocolateShouldGetMissingAMountMessage() { // Arrange var drinkBuilder = new DrinkBuilder(new SugarService(), new MoneyAmountService()); drinkBuilder.SelectDrink(new Chocolate()); drinkBuilder.InsertMoney(0.3); // Act string result = drinkBuilder.SendMessageToUi(); // Assert Assert.False(drinkBuilder.IsAmountIsEnough); Assert.Equal("0,2€ missing", result); }