resolved #9 added test to verify bothify works
This commit is contained in:
@@ -61,5 +61,11 @@
|
||||
<version>4.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-all</artifactId>
|
||||
<version>1.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class BothifyTest {
|
||||
private Faker faker = new Faker();
|
||||
|
||||
@Test
|
||||
public void shouldGenerateLettersAndNumbers() {
|
||||
Assert.assertTrue(faker.bothify("????##@gmail.com").matches("\\w{4}\\d{2}@gmail.com"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user