add Company#industry and Company#profession

This commit is contained in:
Pascal Schumacher
2016-04-14 19:21:48 +02:00
parent 3956349ecd
commit fc81faf7bb
2 changed files with 18 additions and 0 deletions
@@ -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 ]+"));
}
}