Search in sources :

Example 1 with TestParameters

use of ch.acanda.eclipse.pmd.java.resolution.QuickFixTestData.TestParameters in project eclipse-pmd by acanda.

the class PMDIntegrationTest method getTestData.

@Parameters
public static Collection<Object[]> getTestData() {
    final Builder<Object[]> testData = ImmutableList.builder();
    for (final String tests : TEST_DATA_XML) {
        try (final InputStream stream = QuickFixTestData.class.getResourceAsStream(tests)) {
            assertNotNull("Test data file " + tests + " not found.", stream);
            final Collection<TestParameters> data = QuickFixTestData.createTestData(stream);
            for (final TestParameters params : data) {
                testData.add(new Object[] { tests, params });
            }
        } catch (final IOException e) {
            fail(e.getMessage());
        }
    }
    return testData.build();
}
Also used : TestParameters(ch.acanda.eclipse.pmd.java.resolution.QuickFixTestData.TestParameters) InputStream(java.io.InputStream) IOException(java.io.IOException) Parameters(org.junit.runners.Parameterized.Parameters) TestParameters(ch.acanda.eclipse.pmd.java.resolution.QuickFixTestData.TestParameters)

Aggregations

TestParameters (ch.acanda.eclipse.pmd.java.resolution.QuickFixTestData.TestParameters)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Parameters (org.junit.runners.Parameterized.Parameters)1