Added Obazda test image to DevConfiguration.

This commit is contained in:
Jesse Brault 2024-07-28 15:03:42 -05:00
parent 341133f779
commit ff0f22b9e4
2 changed files with 17 additions and 0 deletions

View File

@ -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);

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB