Verified Commit 8fb8371b authored by Carlos Galindo's avatar Carlos Galindo
Browse files

setup tests with maven

parent 55e88421
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,12 @@
                        <target>11</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <!-- JUnit 5 requires Surefire version 2.22.0 or higher -->
                    <version>2.22.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
+13 −0
Original line number Diff line number Diff line
@@ -17,6 +17,19 @@
        <maven.compiler.target>11</maven.compiler.target>
    </properties>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/res</directory>
                <includes>
                    <include>**/*.java</include>
                    <include>**/*.java.*.criterion</include>
                    <include>**/*.java.*.sliced</include>
                </includes>
            </testResource>
        </testResources>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.github.javaparser</groupId>
+3 −1
Original line number Diff line number Diff line
@@ -49,7 +49,9 @@ public class SlicerTest {
    }

    public static Arguments[] findAllFiles() throws FileNotFoundException {
        Collection<Arguments> args = findFiles(new File(TEST_FILES), DOT_JAVA);
        File testFolder = new File(Thread.currentThread().getContextClassLoader()
                .getResource("dinsa-tests/").getPath());
        Collection<Arguments> args = findFiles(testFolder, DOT_JAVA);
        return args.toArray(Arguments[]::new);
    }