Package com.manning.siia.kitchen.domain

Examples of com.manning.siia.kitchen.domain.Meal


    //then rename
    recipeWriting.renameTo(recipeBookLocation.newFile("pilav.xml"));

        Message<?> message = timed.receive(3500);
      assertThat(message, is(notNullValue()));
        Meal meal = (Meal) message.getPayload();
        assertThat(meal.getRecipe().getName(), is("Pilav"));
        assertThat(meal.isDone(), is(true));
    }
View Full Code Here


    Recipe r = RecipeObjectMother.steak();
    recipes.send(MessageBuilder.withPayload(r).build());

    final Message<Meal> message = timed.receive(2500);
    assertThat("Message was null", message, Matchers.is(notNullValue()));
    final Meal meal = message.getPayload();
    assertThat(meal.getRecipe(), is(r));
    assertThat(meal.isDone(), is(true));
  }
View Full Code Here

public class Cook {

  @Aggregator
  public Meal prepareMeal(List<Message<Product>> products) {
    Recipe recipe = (Recipe) products.get(0).getHeaders().get("recipe");
    Meal meal = new Meal(recipe);
    for (Message<Product> message : products) {
      meal.cook(message.getPayload());
    }
    return meal;
  }
View Full Code Here

TOP

Related Classes of com.manning.siia.kitchen.domain.Meal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.