com.github.javafaker.IdNumber Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.apio.architect.sample
Show all versions of com.liferay.apio.architect.sample
Liferay Apio Architect Sample
package com.github.javafaker;
import com.github.javafaker.idnumbers.EnIdNumber;
import com.github.javafaker.idnumbers.SvSEIdNumber;
public class IdNumber {
private final Faker faker;
IdNumber(Faker faker) {
this.faker = faker;
}
public String valid() {
return faker.fakeValuesService().resolve("id_number.valid", this, faker);
}
public String invalid() {
return faker.numerify(faker.fakeValuesService().resolve("id_number.invalid", this, faker));
}
public String ssnValid() {
EnIdNumber enIdNumber = new EnIdNumber();
return enIdNumber.getValidSsn(faker);
}
/**
* Specified as #{IDNumber.valid_sv_se_ssn} in sv-SE.yml
*/
public String validSvSeSsn() {
SvSEIdNumber svSEIdNumber = new SvSEIdNumber();
return svSEIdNumber.getValidSsn(faker);
}
/**
* Specified as #{IDNumber.invalid_sv_se_ssn} in sv-SE.yml
*/
public String invalidSvSeSsn() {
SvSEIdNumber svSEIdNumber = new SvSEIdNumber();
return svSEIdNumber.getInvalidSsn(faker);
}
}