Skip to content

Commit

Permalink
feat: create star project
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Dec 19, 2024
1 parent 2fd212f commit 1f678ff
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/java/com/otaviojava/demos/ddd/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
import jakarta.enterprise.inject.se.SeContainer;
import jakarta.enterprise.inject.se.SeContainerInitializer;
import net.datafaker.Faker;
import net.datafaker.providers.base.Commerce;

import java.util.List;
import java.util.Set;
import java.util.UUID;


public class App {
Expand All @@ -29,7 +32,14 @@ public static void main(String[] args) {

Manufacturer manufacturer = new Manufacturer(faker.company().name(), faker.address().fullAddress(), faker.phoneNumber().cellPhone());
Set<Category> categories = Set.of(new Category("category1", "description1"), new Category("category2", "description2"));

Commerce commerce = faker.commerce();
Product product = new ProductBuilder()
.id(UUID.randomUUID())
.name(commerce.productName())
.manufacturer(manufacturer)
.tags(List.of("tag1", "tag2"))
.categories(categories)
.build();
}
}

Expand Down

0 comments on commit 1f678ff

Please sign in to comment.