Hi,
I'm trying to use Cactus/Junit to test my scenario. I have one test that simply just checks that it can instantiate and init my servlet object. The next test then would use this method in its setUp() method before testing methods for trying to log a root user in from the database. Next I need a TestSetupUsers class that woudl then subclass to use the initialization of the base test and the testLoginRootUser test of the SetupRootUserTest. So what I tried doing initially was something like this:
MyServletTest
testInitServlet()
TestSetupRoot extends MyServletTest
setUp() {
// uses super.testInitServlet()
}
testLoginRotUser()
TestSetupUsers extends TestSetupRoot
setUp() {
// uses super.setUp()and super.testInitServlet()
}
testCreateUsers()
Now, I look thru and I see these tests are no good because of the subclassing. The TestSetupUsers is also testing all the test* methods of the superclasses. I feel like what I'm doing must be somewhat common to other projects-- I would be very interested in any discussions of how to make unit testing dependencies manageable.
Thanks, Jason
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
