Skip to content
Snippets Groups Projects
Verified Commit 8fb8371b authored by Carlos Galindo's avatar Carlos Galindo
Browse files

setup tests with maven

parent 55e88421
No related branches found
No related tags found
1 merge request!44Add CI tests on merge
......@@ -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>
......
......@@ -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>
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment