Of course one does not need to go that far even -- JMockit 
(https://jmockit.dev.java.net/) allows such things too.

It always strikes me as ridiculous to label code patterns as good or bad 
based on the ease of mocking arbitrary bits of them via old-school 
mocking tools.  First, mocking is a dubious exercise -- one should have 
clearly defined API units that are tested as such with minimal or no 
mocking, not test arbitrary units of code in isolation out of some 
puritanical notion.  Second, contorting ones code to meet the severe 
limitations of a tool like EasyMock is pointless when better, more 
flexible tools exist.

--
Jess Holle

[EMAIL PROTECTED] wrote:
>> Of course, if I'm getting to use Groovy/Ruby for writing tests,
>> metaprogramming features do allow me to mock static methods.
>>     
> Interesting... do you have a code snippet that demonstrates this?
>
> >   

--~--~---------~--~----~------------~-------~--~----~
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