use of org.junit.runners.Parameterized.Parameters in project flink by apache.
the class ConnectedComponentsWithDeferredUpdateITCase method getConfigurations.
@Parameters
public static Collection<Object[]> getConfigurations() {
Configuration config1 = new Configuration();
config1.setBoolean("ExtraMapper", false);
Configuration config2 = new Configuration();
config2.setBoolean("ExtraMapper", true);
return toParameterList(config1, config2);
}
use of org.junit.runners.Parameterized.Parameters in project flink by apache.
the class HadoopIOFormatsITCase method getConfigurations.
@Parameters
public static Collection<Object[]> getConfigurations() throws FileNotFoundException, IOException {
LinkedList<Configuration> tConfigs = new LinkedList<Configuration>();
for (int i = 1; i <= NUM_PROGRAMS; i++) {
Configuration config = new Configuration();
config.setInteger("ProgramId", i);
tConfigs.add(config);
}
return TestBaseUtils.toParameterList(tConfigs);
}
use of org.junit.runners.Parameterized.Parameters in project poi by apache.
the class TestReadAllFiles method files.
@Parameters(name = "{index}: {0} using {1}")
public static Iterable<Object[]> files() {
final List<Object[]> files = new ArrayList<Object[]>();
_samples.getFile("").listFiles(new FileFilter() {
@Override
public boolean accept(final File f) {
if (f.getName().startsWith("Test")) {
// && f.getName().equals("TestCorel.shw")
files.add(new Object[] { f });
}
return false;
}
});
return files;
}
use of org.junit.runners.Parameterized.Parameters in project poi by apache.
the class TestFormulasFromSpreadsheet method data.
@Parameters(name = "{0}")
public static Collection<Object[]> data() throws Exception {
// Function "Text" uses custom-formats which are locale specific
// can't set the locale on a per-testrun execution, as some settings have been
// already set, when we would try to change the locale by then
userLocale = LocaleUtil.getUserLocale();
LocaleUtil.setUserLocale(Locale.ROOT);
workbook = HSSFTestDataSamples.openSampleWorkbook(SS.FILENAME);
sheet = workbook.getSheetAt(0);
evaluator = new HSSFFormulaEvaluator(workbook);
List<Object[]> data = new ArrayList<Object[]>();
processFunctionGroup(data, SS.START_OPERATORS_ROW_INDEX, null);
processFunctionGroup(data, SS.START_FUNCTIONS_ROW_INDEX, null);
return data;
}
use of org.junit.runners.Parameterized.Parameters in project hive by apache.
the class TestBeelineArgParsing method data.
@Parameters(name = "{1}")
public static Collection<Object[]> data() throws IOException, InterruptedException {
// generate the dummy driver by using txt file
String u = HiveTestUtils.getFileFromClasspath("DummyDriver.txt");
Map<File, String> extraContent = new HashMap<>();
extraContent.put(new File("META-INF/services/java.sql.Driver"), dummyDriverClazzName);
File jarFile = HiveTestUtils.genLocalJarForTest(u, dummyDriverClazzName, extraContent);
String pathToDummyDriver = jarFile.getAbsolutePath();
return Arrays.asList(new Object[][] { { "jdbc:postgresql://host:5432/testdb", "org.postgresql.Driver", System.getProperty("maven.local.repository") + File.separator + "postgresql" + File.separator + "postgresql" + File.separator + "9.1-901.jdbc4" + File.separator + "postgresql-9.1-901.jdbc4.jar", true }, { "jdbc:dummy://host:5432/testdb", dummyDriverClazzName, pathToDummyDriver, false } });
}
Aggregations