Dynamically create mock instance.
scheruga opened this issue · 0 comments
scheruga commented
Please provide the following information:
- JMockit 1.48
Since it is no longer possible to mock a super class directly,
I would like to do it by useing new MockUp whith a generic implementation of
Object $advice(Invocation inv)
I would like to return an instance of a newly created mocked object all the time.
The type of the returned instance would be of ((Method)inv.getInvokedMember()).getReturnType()
Therefore I would need a possibility to create a Mocked instance dynamically.
(Like requested at #46)