From: David C. <dc...@al...> - 2007-04-23 14:00:36
|
When mocking a class that takes constructor arguments, I'd like to see mock(Class klass) not blow up but simply pass a default value (null, 0, false) for each argument. Normally, if I'm mocking a class, I don't care about them. The rare exception is the class that tries to use those arguments in the contructor, and in that case I have no choice and would fall back on the existing method. Likewise, just because I pass a set of constructor arguments, doesn't mean that I want to name the mock explicitly yet it seems that I'm forced to. Thanks David |