Search in sources :

Example 71 with Parameters

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);
}
Also used : Configuration(org.apache.flink.configuration.Configuration) Parameters(org.junit.runners.Parameterized.Parameters)

Example 72 with Parameters

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);
}
Also used : Configuration(org.apache.flink.configuration.Configuration) LinkedList(java.util.LinkedList) Parameters(org.junit.runners.Parameterized.Parameters)

Example 73 with Parameters

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;
}
Also used : ArrayList(java.util.ArrayList) FileFilter(java.io.FileFilter) File(java.io.File) Parameters(org.junit.runners.Parameterized.Parameters)

Example 74 with Parameters

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;
}
Also used : HSSFFormulaEvaluator(org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator) ArrayList(java.util.ArrayList) Parameters(org.junit.runners.Parameterized.Parameters)

Example 75 with Parameters

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 } });
}
Also used : HashMap(java.util.HashMap) File(java.io.File) Parameters(org.junit.runners.Parameterized.Parameters)

Aggregations

Parameters (org.junit.runners.Parameterized.Parameters)77 ArrayList (java.util.ArrayList)43 File (java.io.File)24 TestCaseContext (org.apache.asterix.testframework.context.TestCaseContext)6 Date (java.util.Date)5 SslContext (io.netty.handler.ssl.SslContext)4 IOException (java.io.IOException)4 ExpiredCRLException (org.apereo.cas.adaptors.x509.authentication.ExpiredCRLException)4 ThresholdExpiredCRLRevocationPolicy (org.apereo.cas.adaptors.x509.authentication.revocation.policy.ThresholdExpiredCRLRevocationPolicy)4 RunWith (org.junit.runner.RunWith)4 ClassPathResource (org.springframework.core.io.ClassPathResource)4 ZonedDateTime (java.time.ZonedDateTime)3 Configuration (org.apache.hadoop.conf.Configuration)3 YarnConfiguration (org.apache.hadoop.yarn.conf.YarnConfiguration)3 RevokedCertificateException (org.apereo.cas.adaptors.x509.authentication.revocation.RevokedCertificateException)3 Parameterized (org.junit.runners.Parameterized)3 CollectionAgentDTO (org.opennms.netmgt.collection.dto.CollectionAgentDTO)3 FileFilter (java.io.FileFilter)2 InputStream (java.io.InputStream)2 Field (java.lang.reflect.Field)2