Re: [Junitdoclet-users] Customisation of output test classes
Brought to you by:
sgemkow
From: <ste...@ob...> - 2003-01-10 15:38:57
|
John, thanks for your question. > Is it possible to configure the output, say if I wanted my test class to > extend something other than JUnits TestCase. I'm thinking this so I could > tie in to HttpUnit also. Sure you can extend your test classes from different base classes. The current use of JUnit's TestCase is defined as part of the template. There "TestCase" is placed between markers. You can a) modify the extend statement of your test classes. Make them extend from different base classes (for example MyTestCaseBase) on an individual basis b) also have your test case implement an interface (It is common to have sets of constants to be declared in separate interface. Every class implementing that interface then is aware of the constants and can use them in a convinient way.) --- You didn't ask for interfaces, I just tell anyway because it fits in here. c) create your own template, if you want to change the superclass of _all_ your test cases. I've been thinking about generating for HttpUnit / Cactus. It won't be difficult to extend JUnitDoclet for that, but right now not everything for Cactus can be generated. (it's the beginXYZ and endXYZ that won't shop up). I guess, we will provide a variable for that XYZ very soon. Maybe you can provide an example, how you would like the generated classes to look like. Regards, Gruesse, Steffen Gemkow -- ObjectFab GmbH ste...@ob... |