Open GoogleCodeExporter opened 8 years ago
Hi Johan,
Interesting suggestion. MockUtil is still internal stuff.
Also did you tried the new mockmaker approach ? MockUtil has been refactored to
delegate a lot of work to the MockMaker.
Cheers,
Brice
Original comment by brice.du...@gmail.com
on 31 Aug 2012 at 2:57
No I haven't tried it, but it looks very interesting. I'll look into it. Thanks
for the tip.
Original comment by johan.ha...@gmail.com
on 31 Aug 2012 at 3:28
I think I've made some progress using the MockMaker SPI but it seems like the
MockHandler implementation created by the MockMaker must return an instance of
InternalMockHandler.
Original comment by johan.ha...@gmail.com
on 31 Aug 2012 at 3:54
Original comment by brice.du...@gmail.com
on 3 Sep 2012 at 9:56
Johan, you're right you cannot replace MockHandler implementation at this time.
Can you tell me a little bit more what are the biggest pain points? Mockito was
not developed for embedded usage but we're working on making things better :)
I'll think about this use case and figure something out.
Original comment by szcze...@gmail.com
on 19 Sep 2012 at 7:10
I've looked at Powermock code and indeed it looks like you needed to do a lot
of creative hackery to wrap Mockito :)
Regarding MockUtil, I'm tempted to relax the way name is obtained, so that if
something is not a mock, we'll return a default name.
Down the road, we need to finish externalizing the MockHandler interface. This
way it should be possible to provide custom implementation of the MockHandler.
Johan feel free to lay out your requirements regarding the api so that we can
make embedding Mockito a better experience.
Original comment by szcze...@gmail.com
on 19 Sep 2012 at 9:13
Original issue reported on code.google.com by
johan.ha...@gmail.com
on 31 Aug 2012 at 2:47