From: Laurent D. <ldu...@ya...> - 2004-05-03 17:56:34
|
Laurent Duperval wrote: > Hi, > > I have a class that I want to mock which is completely static (all > public methods are static). How do I do this? Create a mock that > extends and overrides every method or is there a better way? > Let me expand this a little: I'm writing a servlet. The parameters of the servlet have to be sent to a bunch of static methods that do some sort of magic on them. When testing, I want to replace the real static call to mocked calls that will throw exceptions and stuff like that. I'm not testing the static methods. I want to see how the class that calls the static methods reacts. L |