| 6 | import static org.junit.Assert.assertThat; |
| 7 | |
| 8 | public class BookTest extends AbstractFakerTest { |
| 9 | |
| 10 | @Test |
| 11 | public void testTitle() { |
| 12 | assertThat(faker.book().title(), matchesRegularExpression("([\\p{L}'\\-\\?]+[!,]? ?){2,9}")); |
| 13 | } |
| 14 | |
| 15 | @Test |
| 16 | public void testAuthor() { |
| 17 | assertThat(faker.book().author(), matchesRegularExpression("([\\w']+\\.? ?){2,3}")); |
| 18 | } |
| 19 | |
| 20 | @Test |
| 21 | public void testPublisher() { |
| 22 | assertThat(faker.book().publisher(), matchesRegularExpression("([\\p{L}'&\\-]+[,.]? ?){1,5}")); |
| 23 | } |
| 24 | |
| 25 | @Test |
| 26 | public void testGenre() { |
| 27 | assertThat(faker.book().genre(), matchesRegularExpression("([\\w/]+ ?){2,4}")); |
| 28 | } |
| 29 | } |
nothing calls this directly
no outgoing calls
no test coverage detected