use of uk.gov.justice.services.example.cakeshop.persistence.entity.Recipe in project microservice_framework by CJSCommonPlatform.
the class RecipeRepositoryTest method shouldReturnNullIfRecipeNotFound.
@Test
public void shouldReturnNullIfRecipeNotFound() {
Recipe recipe = recipeRepository.findBy(UUID.randomUUID());
assertThat(recipe, is(nullValue()));
}
use of uk.gov.justice.services.example.cakeshop.persistence.entity.Recipe 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