19 Haziran 2023 Pazartesi

Javafaker

Maven
Şu satırı dahil ederiz
<dependency>
  <groupId>com.github.javafaker</groupId>
  <artifactId>javafaker</artifactId>
  <version>1.0.2</version>
</dependency>
Örnek
Şöyle yaparız
Faker faker = new Faker(Locale.FRANCE);

String teamName = faker.team().name();

faker.address().city();
faker.address().zipCode();
faker.address().streetAddress();

faker.name().firstName();
faker.name().lastName();

faker.date().birthday(18, 38);
faker.random().nextInt(0, 20)
faker.random().nextBoolean()

Hiç yorum yok:

Yorum Gönder