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

Method data

src/test/java/com/github/javafaker/integration/FakerIT.java:65–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 }
64
65 @Parameterized.Parameters(name = "testing locale {0} and random {1}")
66 public static Collection<Object[]> data() {
67 Object[][] data = new Object[][]{
68 {Locale.ENGLISH, new Random()},
69 {new Locale("pt-BR"), null},
70 {new Locale("pt-br"), null},
71 {new Locale("Pt_br"), null},
72 {new Locale("pT_Br"), null},
73 {new Locale("pt","Br","x2"), null},
74 {null, new Random()},
75 {null, null}};
76
77 String[] ymlFiles = new File("./src/main/resources").list();
78 int numberOfYmlFiles = ymlFiles.length;
79 Object[][] dataFromYmlFiles = new Object[numberOfYmlFiles][2];
80 for (int i = 0; i < numberOfYmlFiles; i++) {
81 String ymlFileName = ymlFiles[i];
82 dataFromYmlFiles[i][0] = new Locale(StringUtils.substringBefore(ymlFileName, "."));
83 }
84
85 List<Object[]> allData = new ArrayList<Object[]>(Arrays.asList(data));
86 allData.addAll(Arrays.asList(dataFromYmlFiles));
87 return allData;
88 }
89
90 @Test
91 public void testAllFakerMethodsThatReturnStrings() throws Exception {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected