Skip to content

Commit

Permalink
Merge pull request #38 from JavierABarreto/feature-add-randomimage-me…
Browse files Browse the repository at this point in the history
…thod

Feat: Add randomImage method
  • Loading branch information
nmarulo authored Oct 22, 2024
2 parents 5ec3f86 + 6ef7bc3 commit 47a8c29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/test/java/dev/nmarulo/depensaapp/FakeTestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@ public static String randomUsername() {
return faker.internet()
.username();
}

public static String randomImage() {
return faker.internet()
.image();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private static Product initProduct() {
product.setId(FakeTestUtil.randomLong());
product.setName(FakeTestUtil.randomWord());
product.setPrice(BigDecimal.ZERO);
product.setImgUrl("product.setImgUrl");
product.setImgUrl(FakeTestUtil.randomImage());
product.setCalories(BigDecimal.ZERO);
product.setDescription(FakeTestUtil.randomSentence());
product.setCreatedAt(LocalDateTime.now());
Expand Down

0 comments on commit 47a8c29

Please sign in to comment.