Reputation: 11
I am currently trying to introduce unit tests to a legacy project based on ant. The problem is that the project's structure is a little unconventional: Java files mixed up with xml files in the same directory, there are multiple java source directories, the Java files depend on import jars wich are not present in the same project ...
What is a clean way to introduce unit tests to a project with this structure:
--->project
----->folder1
----->folder2
-----file1.java
-----file2.xml
-----file3.prop
----->folder3
Upvotes: 0
Views: 295
Reputation: 28101
I'd probably do it like:
--->project
----->folder1
----->folder1-test
----->folder2
-----file1.java
-----file2.xml
-----file3.prop
----->folder2-test
-----file1Test.java
-----file2Test.xml
----->folder3
----->folder3-test
Or bite the bullet and refactor using maven conventions
folder1/src/main/java
folder1/src/main/resources
folder1/src/test/java
folder1/src/test/resources
etc...
Upvotes: 1