What is the convention for Java unit tests in a Grails project?
I am creating a new Grails project that uses some Java code to do some of the开发者_C百科 "core" processing. The java code will go in [project-home]/src/java. Where should the unit tests for this Java classes go? [project-home]/test/unit, intermingled with the groovy unit tests? What is the convention for this scenario?
Thanks in advance,
Yvon
I do not believe that you will gain anything by segregating tests on your java code from tests on your groovy code. Most likely, testing pure-java classes in a grails application will imply mocking your domain and other services (sometimes grails services). It is more convenient to test them in a GrailsUnitTestCase, all under unit/test
Regards,
Vincent Giguère
精彩评论