Added Obazda test image to DevConfiguration.
This commit is contained in:
parent
341133f779
commit
ff0f22b9e4
@ -44,10 +44,27 @@ public class DevConfiguration {
|
||||
);
|
||||
logger.info("Created {}", testUser);
|
||||
|
||||
final ImageCreateInfoSpec obazdaCreateSpec = new ImageCreateInfoSpec();
|
||||
obazdaCreateSpec.setAlt("Obazda");
|
||||
obazdaCreateSpec.setCaption("German Obazda.");
|
||||
obazdaCreateSpec.setPublic(true);
|
||||
final Image obazdaImage;
|
||||
try (final InputStream obazdaStream = DevConfiguration.class.getResourceAsStream("Obazda.jpg")) {
|
||||
obazdaImage = this.imageService.create(
|
||||
testUser,
|
||||
"Obazda.jpg",
|
||||
obazdaStream,
|
||||
48654L,
|
||||
obazdaCreateSpec
|
||||
);
|
||||
}
|
||||
logger.info("Created {}", obazdaImage);
|
||||
|
||||
final RecipeCreateSpec recipeCreateSpec = new RecipeCreateSpec();
|
||||
recipeCreateSpec.setTitle("Test Recipe");
|
||||
recipeCreateSpec.setRawText("Hello, World!");
|
||||
recipeCreateSpec.setPublic(true);
|
||||
recipeCreateSpec.setMainImage(obazdaImage);
|
||||
final Recipe recipe = this.recipeService.create(testUser, recipeCreateSpec);
|
||||
logger.info("Created {}", recipe);
|
||||
|
||||
|
BIN
src/main/resources/app/mealsmadeeasy/api/Obazda.jpg
Normal file
BIN
src/main/resources/app/mealsmadeeasy/api/Obazda.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Loading…
Reference in New Issue
Block a user