mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
fixed broken tests
This commit is contained in:
@@ -82,7 +82,7 @@ public class HeaderValidationTest {
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@Before
|
||||
public void initialize() {
|
||||
sut = new Validator(config);
|
||||
sut = new Validator(config, new TestColumnValueProvider());
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,21 @@ public class HeaderValidationTest {
|
||||
}
|
||||
|
||||
public static String json(String... headerNames) {
|
||||
return "{\"headers\":{\"list\":[" + asList(headerNames).stream().collect(joining(", ")) + "]}}";
|
||||
|
||||
String json = "{ \"fields\": [";
|
||||
|
||||
for (String headerName: headerNames) {
|
||||
json += "{\"name\" : \""+headerName+"\" },";
|
||||
}
|
||||
|
||||
if (headerNames != null && headerNames.length > 0) {
|
||||
json = json.substring(0, json.length() - 1);
|
||||
}
|
||||
|
||||
json += "]}";
|
||||
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user