Conversation
383f062 to
22c1023
Compare
|
@ekuefler could you please check this PR? |
|
Thanks for the PR. I see the value of this but am hesitant to expose any API in StubGenerator - like the javadoc in that class mentions, that class (and the rest of the impl package) is intended to be called only by generated code and not invoked by users directly. There might also be some unexpected behavior since StubGenerator is invoked only in certain circumstances: Do you think it would be possible to expose this API via a protected method on GwtMockitoTestRunner that users could override? Something like |
When used with Elemental it's quite handy to be able to override
Js.asPropertyMapand other static methods to return something remotely useful. Providing list of such methods is not in the scope of this PR, but by exposing the necessary API anyone can subclass GwtMockitoRunner and mock the methods in their implementation. The alternative -- mocking those methods using powermock or mockito inline -- is very cumbersome because of the different classsloaders.