Exemplo n.º 1
0
    def setUp(self):
        ingredient = Ingredient.create("Pão")
        Ingredient.set_value(ingredient, 1.25)
        ingredient = Ingredient.create("Hamburger")
        Ingredient.set_value(ingredient, 1)
        ingredient = Ingredient.create("Bacon")
        Ingredient.set_value(ingredient, 2)

        name = "X-Bacon"
        list = ["Pão", "Hamburger", "Bacon"]
        profit = 5.5
        sandwich = Sandwich.create(name, profit, list)

        beverage = Beverage.create("Coca-cola", "2 Litros", 6)
Exemplo n.º 2
0
def create_execute(name, price):
    ingredient = Ingredient.create(name)
    Ingredient.set_value(ingredient, price)
Exemplo n.º 3
0
 def test_create_ingredient(self):
     ingredient = Ingredient.create("Alface")
     self.assertEqual(ingredient.id, 4)