Conversation
|
Thanks for the contrib @manne. Will take a look later today |
|
I haven't forgotten this. Just holding of on merging it until I get a chance to test it out. Currently preoccupied with some bug fixes |
|
@tonerdo how can I help that this PR gets merged? |
|
Hi @manne, my sincere apologies for letting this slide for too long. I've been a bit swamped. I'm curious, in what instances will swapping out for a different constructor be beneficial? You'll run into issues because the return types are different from what is expected within the code. Will love to hear your thoughts |
|
@tonerdo the design of the software for which I needed this, is/was sub optimal. Instead of utilizing dependency injection, an instance of a class, causing some serious side effects for (unit/integration) tests, is created deep down in the code. With this functionality the implementation can be changed, so no side effects will happen. |
|
@manne , wouldn't it be better to wrap the side-effects in methods and then just fake those? |
adds functionality to replace the constructor invocation with the constructor from a different class