You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2007/04/11 18:22:46 UTC
[jira] Updated: (SUREFIRE-309) Disabling POJO tests - Problem with
parametrized constructors
[ http://jira.codehaus.org/browse/SUREFIRE-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated SUREFIRE-309:
----------------------------------
Fix Version/s: 2.4
> Disabling POJO tests - Problem with parametrized constructors
> -------------------------------------------------------------
>
> Key: SUREFIRE-309
> URL: http://jira.codehaus.org/browse/SUREFIRE-309
> Project: Maven Surefire
> Issue Type: Wish
> Components: classloading
> Affects Versions: 2.3
> Reporter: Daniel Lindner
> Fix For: 2.4
>
>
> If you include a class that matches the test class pattern but is a regular class (e.g. a helper or mock implementation of a production type) to the test directories, the surefire plugin attempts to run POJO-tests on it. This fails if there is no non-argument default constructor. The failure breaks the test cycle.
> There are three ways to resolve the effect:
> - Move the POJO class away or rename it. Both is only needed because surefire lacks support
> - Adjust the test class pattern. This is probably possible.
> - Make surefire aware of the problem. Either make it configurable or do not attempt to POJO-test classes without default constructor. At least, do not fail the tests if this situation occurs.
> The third way of handling the issue is my suggestion. I would prefer the solution "by convention" that POJO tests need a default constructor and other classes will be ignored.
> To recreate the problem, add a class named TestThisPOJONot to your test classes and give it a constructor with parameters.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira