jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei <avso...@mail.ru>
Subject inner static classes
Date Mon, 29 Oct 2001 13:12:28 GMT
Hi all,
I have got a question concerning inner static classes.
I have just started using two static inner test classes for one java class. 
It looks like this:

public class MyClass {
    ...

    /** Test class.*/
    public static class LocalTest extends junit.framework.TestCase {
          // tests
    }  
    /** Test class.*/
    public static class ServerTest extends ServletTestCase  {
          // tests
    }        
}

I test code that do not need to be executed on the server in 
the LocalTest class (usually small private methods).
Advantages:
1. you do not think about the server while developing
2. test takes less time if executed alone. 
  (if you execute the whole suite for all classes you win nearly nothing)

After developing it is possible to move all methods from LocalTest to ServerTest and remove
LocalTest. Or one can leave it as it is.

The question is: is this way (using two inner test classes) error prone? What are disadvantages?

Many thanks,

Andrei
   
P.S. I could not find in the archive any messages about inner static test 
classes. Does anybody use them?


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message