Last active
September 26, 2021 20:01
-
-
Save eliasnogueira/30d2a794e836b6abab45c00248a34df5 to your computer and use it in GitHub Desktop.
Basic data generation for an object using RandomStringUtils
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 RandomStringUtils") | |
void randomStringUtils() { | |
CustomerData customerData = CustomerData.builder(). | |
id(Integer.valueOf(RandomStringUtils.randomNumeric(10))). | |
name(RandomStringUtils.randomNumeric(50)). | |
profession(RandomStringUtils.randomAlphanumeric(30)). | |
accountNumber(RandomStringUtils.randomAlphanumeric(18)). | |
address(RandomStringUtils.randomAlphanumeric(50)). | |
phoneNumber(RandomStringUtils.randomAlphanumeric(14)). | |
birthday(new Date()). | |
build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment