Last active
October 4, 2022 14:20
-
-
Save eliasnogueira/e02e03a2009d3831bf27c378d1478bfb to your computer and use it in GitHub Desktop.
DataFaker example for the CustomerData data generation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BasicExampleTest { | |
@Test | |
@DisplayName("Data validations using faker library") | |
void faker() { | |
Faker faker = new Faker(); | |
CustomerData customerData = CustomerData.builder(). | |
id((int) faker.number().randomNumber()). | |
name(faker.name().name()). | |
profession(faker.company().profession()). | |
accountNumber(faker.finance().iban("NL")). | |
address(faker.address().streetAddress()). | |
phoneNumber(faker.phoneNumber().cellPhone()). | |
birthday(faker.date().birthday(18, 90)). | |
build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment