@Parameterized.Parameters(name = "{0}")
public static Iterable<Object[]> data() {
List<TestCase> cases = Arrays.asList(files).stream().map(file->fileRoot + file).map(file -> {
try (InputStream is = FileTestRunner.class.getClassLoader().getResourceAsStream(file)) {
try (InputStreamReader isr = new InputStreamReader(is)) {
return (List<TestCase>)(new TestSuiteParser().parse(isr, file));
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}).flatMap(icases -> icases.stream()).collect(Collectors.toList());