add Company#industry and Company#profession
This commit is contained in:
@@ -18,4 +18,12 @@ public class Company {
|
||||
public String suffix() {
|
||||
return fakeValuesService.safeFetch("company.suffix");
|
||||
}
|
||||
|
||||
public String industry() {
|
||||
return fakeValuesService.safeFetch("company.industry");
|
||||
}
|
||||
|
||||
public String profession() {
|
||||
return fakeValuesService.safeFetch("company.profession");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,14 @@ public class CompanyTest {
|
||||
public void testSuffix() {
|
||||
assertThat(faker.company().suffix(), matchesRegularExpression("[A-Za-z ]+"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIndustry() {
|
||||
assertThat(faker.company().industry(), matchesRegularExpression("[A-Za-z\\-/& ]+"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProfession() {
|
||||
assertThat(faker.company().profession(), matchesRegularExpression("[a-z ]+"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user