| 6 | import static org.junit.Assert.assertThat; |
| 7 | |
| 8 | public class ColorTest extends AbstractFakerTest { |
| 9 | |
| 10 | @Test |
| 11 | public void testName() { |
| 12 | assertThat(faker.color().name(), matchesRegularExpression("(\\w+ ?){1,2}")); |
| 13 | } |
| 14 | |
| 15 | @Test |
| 16 | public void testHex() { |
| 17 | assertThat(faker.color().hex(), matchesRegularExpression("^#[0-9A-F]{6}$")); |
| 18 | } |
| 19 | |
| 20 | @Test |
| 21 | public void testHexNoHashSign() { |
| 22 | assertThat(faker.color().hex(false), matchesRegularExpression("^[0-9A-F]{6}$")); |
| 23 | } |
| 24 | } |
nothing calls this directly
no outgoing calls
no test coverage detected