Missing constructors for tests

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing constructors for tests

Russel Winder-2
On a set of tests that run fine under Gant and Ant, Gradle is giving me
test failures such as:

junit.framework.AssertionFailedError: Class
gant.tools.tests.AntFile_Test$_closure1 has no public constructor
TestCase(String name) or TestCase()

So by default Gradle is requiring unit test classes to have a definite
structure but the question is how to sort this out when Gant, Ant and
Maven do not have equivalent rules.

Oh and yes I am creating a Gradle build for Gant :-)

--
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Missing constructors for tests

Adam Murdoch-2


Russel Winder wrote:

> On a set of tests that run fine under Gant and Ant, Gradle is giving me
> test failures such as:
>
> junit.framework.AssertionFailedError: Class
> gant.tools.tests.AntFile_Test$_closure1 has no public constructor
> TestCase(String name) or TestCase()
>
> So by default Gradle is requiring unit test classes to have a definite
> structure but the question is how to sort this out when Gant, Ant and
> Maven do not have equivalent rules.
>
>  

I think this is related to the fact that the test task attempts to run
everything as a junit test, including generated closure classes (see my
other email for details). We certainly don't (intentionally) apply any
constraints on test classes other than those which junit applies.

Could you try setting the include/exclude patterns for the test task?

> Oh and yes I am creating a Gradle build for Gant :-)
>
>  

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email