File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/test/java/net/datafaker/providers/base Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1
1
package net .datafaker .providers .base ;
2
2
3
+ import org .junit .jupiter .api .AfterAll ;
4
+ import org .junit .jupiter .api .BeforeAll ;
5
+ import org .junit .jupiter .api .Nested ;
6
+
3
7
import java .util .List ;
4
8
import java .util .Collection ;
9
+ import java .util .Locale ;
5
10
6
11
class JobTest extends BaseFakerTest <BaseFaker > {
7
12
@@ -13,4 +18,27 @@ protected Collection<TestSpec> providerListTest() {
13
18
TestSpec .of (job ::position , "job.position" ),
14
19
TestSpec .of (job ::keySkills , "job.key_skills" , "(?:[A-Za-z-]+ ?){1,3}" ));
15
20
}
21
+
22
+ @ Nested
23
+ class JobInGreekTest extends BaseFakerTest <BaseFaker > {
24
+
25
+ @ BeforeAll
26
+ void setup () {
27
+ this .setFaker (new BaseFaker (new Locale ("el" , "GR" )));
28
+ }
29
+
30
+ @ AfterAll
31
+ void reset () {
32
+ this .setFaker (this .getFaker ());
33
+ }
34
+
35
+ @ Override
36
+ protected Collection <TestSpec > providerListTest () {
37
+ Job job = faker .job ();
38
+ return List .of (TestSpec .of (job ::field , "job.field" ),
39
+ TestSpec .of (job ::seniority , "job.seniority" ),
40
+ TestSpec .of (job ::position , "job.position" ),
41
+ TestSpec .of (job ::keySkills , "job.key_skills" , "(?:\\ p{L}+ ?){1,3}" ));
42
+ }
43
+ }
16
44
}
You can’t perform that action at this time.
0 commit comments