you can mock statict classes with power mock , but i'vé come to the konklusion that it is a code smell going that way ioc are much better.
-from my htc 2009/5/15, James Carman <jcar...@carmanconsulting.com>: > On Fri, May 15, 2009 at 12:18 PM, alf.redo > <alfredo.alean...@logobject.ch> wrote: >> >> Thank you to all for your precious suggestions. >> >> My question is not for a real need. >> Supposing to discard the injection "strategy", I would like to know if the >> cache of an object into my WebApplication class during application startup >> has the same result if I make this object Singleton (and not store it in >> WebApplication). Can be some problems about "thread-safety" or other issue >> in one case rather than the other? > > Making the object a "singleton" would make unit testing more difficult, > IMHO. > > Thread-safety is all up to how you implement the class, really. You'd > have to be aware of threading issues either way. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Sendt fra min mobile enhed --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org