Datai
A set of multiple data generators to help you in your code tests.
Documentation Datai
Surname
(Datai.surname() -> String)
Returns a String of a random surname.
"Smith"
Male Name
(Datai.maleName() -> String)
Returns a String of a random male's name.
"John"
Female Name
(Datai.femaleName() -> String)
Returns a String of a random female's name.
"Mary"
State
(Datai.state() -> String)
Returns a String of a random mexican state's acronym.
"BS"
Street
(Datai.street() -> String)
Returns a String of a random street.
"Anillo Periferico"
Phone
(Datai.phone() -> String)
Returns a String of a random phone number.
"55 1656 7394"
Phone
(Datai.phone(String prefix) -> String)
Returns a String of a random phone number given a prefix.
prefix: "+52" -> "+52 55 1523 7569"
Address
(Datai.address() -> String)
Returns a String of a random street with a random number.
"Avenida Alvaro Obregon 59"
Name
(Datai.name() -> String)
Returns a String of a random name.
"William"
Full Name
(Datai.fullName() -> String)
Returns a String of a random name with a first, middle and last name.
"Patricia Brown Miller"
Full Name
(Datai.fullName(char gender) -> String)
Returns a String of a random name with a first, middle and last name. Given a gender 'H' male or 'M' female.
gender: 'H' -> "Robert Davis Jones"
Full Person
(Datai.fullPerson() -> String[])
Returns an array with all the data of a person with the next format:
[full name, name, surname, gender, age, date of birth, CURP, RFC, phone, email, address]
["Alexander Kaufman Clay", "Alexander", "Kaufman Clay", "H", "70", "23-10-1952", "KACA521023HTSFLL18", "KACA521023H61G", "+52 55 9239 4418", "alexander.kaufman@gmail.com"]
Full Person
(Datai.fullPerson(char gender) -> String[])
Returns an array with all the data of a person given a gender 'H' male or 'M' female with the next format:
[full name, name, surname, age, date of birth, CURP, RFC, phone, email, address]
gender: 'M' -> ["Margaret Coleman Gomez", "Margaret", "Coleman Gomez", "M", "22", "18-02-2000", "COGM000218MBCLMRG2", "COGM000218MK3X", "+52 55 3062 0863", "margaret.coleman@gmail.com"]
Documentation RandPerson
About
The RandPerson object allows you to create a full person (same as Datai.fullPerson() and Datai.fullPerson(char gender)), but being an object it's easier to access all the attributes.
Constructor
RandPerson()
You can construct a RandPerson object with a random gender..
RandPerson(char gender)
You can construct a RandPerson object with a char defining it's gender ('H' male or 'M' female).
Methods
Full Name
(RandPerson.getFullName() -> String)
Returns RandPerson's full name.
Name
(RandPerson.getName() -> String)
Returns RandPerson's name.
Surname
(RandPerson.getSurname() -> String)
Returns RandPerson's surname.
Gender
(RandPerson.getGender() -> String)
Returns RandPerson's gender.
Age
(RandPerson.getAge() -> String)
Returns RandPerson's age.
Date of Birth
(RandPerson.getBorn() -> String)
Returns RandPerson's date of birth.
CURP
(RandPerson.getCurp() -> String)
Returns RandPerson's CURP.
RFC
(RandPerson.getRfc() -> String)
Returns RandPerson's RFC.
Phone
(RandPerson.getPhone() -> String)
Returns RandPerson's phone.
(RandPerson.getEmail() -> String)
Returns RandPerson's email.
Address
(RandPerson.getAddress() -> String)
Returns RandPerson's address.