mercredi 29 juillet 2015

Map different source directories to different test subdirectories

I have an Eclipse Project with JUnit and moreUnit installed. I have two source folders:

src/
demo/

I have a test directory that, via moreUnit and CTRL-J, allows me to quickly create a unit test class but only for packages within src/.

I would like to map the test directory to the above source directories so that when I create a new Unit test, it goes automatically to one of two packages within test: src or demo.

Example of file hierarchy:

src/
    my_package
        MyClass.java

demo/
    my_package
        MyOtherClass.java

And corresponding (desired) test layout:

test/
     src
         my_package
             MyClassTest.java
     demo
         my_package
             MyOtherClassTest.java

Within test, src and demo can be packages or subdirectories, it doesn't matter: as long as moreUnit is able to create the test class in right "branch".

Aucun commentaire:

Enregistrer un commentaire