> I have a class that I wont to test. Lets say this class has 10
> methods. These methods accept each for example 2 arguments. For
> each method I write 5 tests (5 tests that send different arguments to
> each method) that makes 10 * 5 test methods = 50 test methods. Too
> many methods and code for me in one test class, So I figured out i
> would extend my test class to different ones and reuse its setup()
> teardown(), however when extending it in the suite of my extending
> class I had to specify each test method I wanted to test otherwise If
> I used
> testSuite.addTestSuite(ExtendingInternalServicesTest.class);
> then it not only ran the ExtendingInternalServicesTest but also ran
> the InternalServicesTest test methods... so my question is is there
> anyway to have the suite of my extending test class
> testSuite.addTestSuite(ExtendingInternalServicesTest.class); without
> its running its super test methods.
JUnit is intentionally designed so that TestCase classes inherit tests
from its superclasses. If you don't want the suite from
ExtendingInternalServicesTest to include tests from
InternalServicesTest, then why do you have one class extend the other?
Why not have both classes extend a common superclass?
--
J. B. (Joe) Rainsberger
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Predictable, repeatable, quality delivery
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/junit/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
