use of org.junit.runners.Parameterized.Parameters in project asterixdb by apache.
the class AbstractExecutionIT method tests.
@Parameters
public static Collection<Object[]> tests() throws Exception {
Collection<Object[]> testArgs = new ArrayList<Object[]>();
TestCaseContext.Builder b = new TestCaseContext.Builder();
for (TestCaseContext ctx : b.build(new File(PATH_BASE))) {
testArgs.add(new Object[] { ctx });
}
return testArgs;
}
use of org.junit.runners.Parameterized.Parameters in project asterixdb by apache.
the class OptimizerParserTest method tests.
@Parameters(name = "OptimizerParserTest {index}: {0}")
public static Collection<Object[]> tests() {
Collection<Object[]> testArgs = new ArrayList<>();
ParserTestUtil.suiteBuild(new File(PATH_QUERIES), testArgs, "", File.separator, EXTENSION_QUERY, EXTENSION_RESULT, PATH_EXPECTED, PATH_ACTUAL);
return testArgs;
}
use of org.junit.runners.Parameterized.Parameters in project calcite-avatica by apache.
the class AvaticaSpnegoTest method parameters.
@Parameters
public static List<Object[]> parameters() throws Exception {
final ArrayList<Object[]> parameters = new ArrayList<>();
// Start the KDC
setupKdc();
// Create a LocalService around HSQLDB
final JdbcMeta jdbcMeta = new JdbcMeta(CONNECTION_SPEC.url, CONNECTION_SPEC.username, CONNECTION_SPEC.password);
final LocalService localService = new LocalService(jdbcMeta);
for (Driver.Serialization serialization : new Driver.Serialization[] { Driver.Serialization.JSON, Driver.Serialization.PROTOBUF }) {
// Build and start the server
HttpServer httpServer = new HttpServer.Builder().withPort(0).withAutomaticLogin(serverKeytab).withSpnego(SpnegoTestUtil.SERVER_PRINCIPAL, SpnegoTestUtil.REALM).withHandler(localService, serialization).build();
httpServer.start();
SERVERS_TO_STOP.add(httpServer);
final String url = "jdbc:avatica:remote:url=http://" + SpnegoTestUtil.KDC_HOST + ":" + httpServer.getPort() + ";authentication=SPNEGO;serialization=" + serialization;
LOG.info("JDBC URL {}", url);
parameters.add(new Object[] { url });
}
return parameters;
}
use of org.junit.runners.Parameterized.Parameters in project poi by apache.
the class TestPPTX2PNG method data.
@Parameters(name = "{0}")
public static Collection<String> data() {
final Set<String> data = new TreeSet<String>();
for (String f : files.split(", ?")) {
if (basedir == null) {
data.add(f);
} else {
final Pattern p = Pattern.compile(f);
basedir.listFiles(new FileFilter() {
public boolean accept(File pathname) {
String name = pathname.getName();
if (p.matcher(name).matches()) {
data.add(name);
}
return false;
}
});
}
}
return data;
}
use of org.junit.runners.Parameterized.Parameters in project poi by apache.
the class TestRVA method data.
@Parameters(name = "{1}")
public static Collection<Object[]> data() throws Exception {
poifs = new NPOIFSFileSystem(HSSFTestDataSamples.getSampleFile("testRVA.xls"), true);
workbook = new HSSFWorkbook(poifs);
sheet = workbook.getSheetAt(0);
List<Object[]> data = new ArrayList<Object[]>();
for (int rowIdx = 0; true; rowIdx++) {
HSSFRow row = sheet.getRow(rowIdx);
if (row == null) {
break;
}
HSSFCell cell = row.getCell(0);
if (cell == null || cell.getCellTypeEnum() == CellType.BLANK) {
break;
}
String formula = cell.getCellFormula();
data.add(new Object[] { cell, formula });
}
return data;
}
Aggregations