use of uk.gov.justice.services.example.cakeshop.domain.event.RecipeAdded in project microservice_framework by CJSCommonPlatform.
the class RecipeCommandHandlerTest method existingRecipe.
private Recipe existingRecipe() {
final Recipe recipe = new Recipe();
recipe.apply(new RecipeAdded(RECIPE_ID, RECIPE_NAME, GULTEN_FREE, emptyList()));
return recipe;
}
use of uk.gov.justice.services.example.cakeshop.domain.event.RecipeAdded in project microservice_framework by CJSCommonPlatform.
the class RecipeAddedToRecipeConverterTest method shouldConvertRecipeAddedEvent.
@Test
public void shouldConvertRecipeAddedEvent() {
final String name = "someName123";
final UUID recipeId = UUID.randomUUID();
final boolean glutenFree = true;
final List<Ingredient> ingredients = Collections.singletonList(new Ingredient("sugar", 2));
Recipe recipe = converter.convert(new RecipeAdded(recipeId, name, glutenFree, ingredients));
assertThat(recipe.getName(), equalTo(name));
assertThat(recipe.getId(), equalTo(recipeId));
assertThat(recipe.isGlutenFree(), equalTo(glutenFree));
}
Aggregations