Yea, its easy to test a static method itself.  The situation I was
refering to is unit testing something (I.e. a stateful object) that
has a dependency on a static method.  Isolating the stateful object
from the static method it calls can be difficult.  Getting isolation
from little static String utilities may not be a big deal, and I use
those a lot.  But, gaining isolation from a static method that may be
larger, more complex, or have a dependency on something like a
database can make testing more difficult than it should be.

Of course, if I'm getting to use Groovy/Ruby for writing tests,
metaprogramming features do allow me to mock static methods.  I don't
always get to use Groovy/Ruby to write test though. :(




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to