Steve Freeman wrote:
> Short answer. Because Java is not really an object-oriented language,
> you can't mock static methods. You have to have an instance to talk
> to. Looks like you'll have to wrap the static code in something that
> can be instantiated.
>
> If you really don't want to do that, you might have to try something
> like using Aspects to intercept, although that has its own issues.
>
While reading about some mock generators, I found that out. I don't own
the code so I'm not sure what I'll be doing. I'll think about it.
Thanks,
L
|