Add methods for missing Harry Potter entries
This commit is contained in:
@@ -22,4 +22,12 @@ public class HarryPotter {
|
||||
public String book() {
|
||||
return faker.resolve("harry_potter.books");
|
||||
}
|
||||
|
||||
public String house() {
|
||||
return faker.resolve("harry_potter.houses");
|
||||
}
|
||||
|
||||
public String spell() {
|
||||
return faker.resolve("harry_potter.spells");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,4 +28,14 @@ public class HarryPotterTest extends AbstractFakerTest {
|
||||
public void book() {
|
||||
assertThat(faker.harryPotter().book(), matchesRegularExpression("Harry Potter and the ([A-Za-z'\\-]+ ?)+"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void house() {
|
||||
assertThat(faker.harryPotter().house(), matchesRegularExpression("[A-Za-z ]+"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void spell() {
|
||||
assertThat(faker.harryPotter().spell(), matchesRegularExpression("[A-Za-z ]+"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user