You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Rod Macpherson <rm...@abovehealth.com> on 2005/09/21 15:42:26 UTC
Sweeter Suites
Would something like this be worth adding to cactus? I cobbled together
a class called MethodTestSuite that dynamically creates tests based on a
method name. Granted, it's just syntatic sugar for
suite.add(newMyTestSuite("myMethod")) which I found rather tart:)
public class MyTestSuite extends TestCase
{
public static Test suite()
{
MethodTestSuite suite = new
MethodTestSuite(MyTestSuite.class);
suite.add("testDial");
suite.add("testConnect");
suite.add("testDisconnect");
return suite;
}
...
}
RE: Sweeter Suites
Posted by Vincent Massol <vm...@pivolis.com>.
Hi Rod,
> -----Original Message-----
> From: Rod Macpherson [mailto:rmacpherson@abovehealth.com]
> Sent: mercredi 21 septembre 2005 15:42
> To: Cactus Users List
> Subject: Sweeter Suites
>
> Would something like this be worth adding to cactus? I cobbled together
> a class called MethodTestSuite that dynamically creates tests based on a
> method name. Granted, it's just syntatic sugar for
> suite.add(newMyTestSuite("myMethod")) which I found rather tart:)
Thanks for the proposal. Personally I don't think it fits in the Cactus
project. I don't see anything related to Cactus there. I do see stuff
related to JUnit though but JUnit is a different project...
> public class MyTestSuite extends TestCase
> {
> public static Test suite()
> {
> MethodTestSuite suite = new
> MethodTestSuite(MyTestSuite.class);
>
> suite.add("testDial");
> suite.add("testConnect");
> suite.add("testDisconnect");
>
> return suite;
> }
> ...
> }
It doesn't buy you much I think and also it doesn't support Test suite
constructors that take more than a string parameter. Anyway that's a junit
topic.
Thanks
-Vincent