MCPcopy Create free account
hub / github.com/DiUS/java-faker / DemographicTest

Class DemographicTest

src/test/java/com/github/javafaker/DemographicTest.java:8–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import org.junit.Test;
7
8public class DemographicTest extends AbstractFakerTest {
9
10 @Test
11 public void race() {
12 assertThat(faker.demographic().race(), matchesRegularExpression("(\\w+ ?)+"));
13 }
14
15 @Test
16 public void educationalAttainment() {
17 assertThat(faker.demographic().educationalAttainment(), matchesRegularExpression("(?U)([\\w'-]+ ?)+"));
18 }
19
20 @Test
21 public void demonym() {
22 assertThat(faker.demographic().demonym(), matchesRegularExpression("(?U)([\\w'-]+ ?)+"));
23 }
24
25 @Test
26 public void maritalStatus() {
27 assertThat(faker.demographic().maritalStatus(), matchesRegularExpression("(\\w+ ?)+"));
28 }
29
30 @Test
31 public void sex() {
32 assertThat(faker.demographic().sex(), matchesRegularExpression("\\w+"));
33 }
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected