fsparv / EasierMock

An add on to make Easy Mock even Easier
Apache License 2.0
0 stars 0 forks source link

Explore the possibility of supporting Mockito #7

Open fsparv opened 7 years ago

fsparv commented 7 years ago

Mockito by itself doesn't quite provide the pattern enabled by EasierMock + EasyMock.

Spies are sort of like ObjectUnderTest mocks except backwards in that they pass everything through to a real instance every time but provide validation, So to get the once and only once effect we might want to swap a mock and a spy based on the "replay" call, but that won't quite handle self-calls of other methods on the same object...

Alternately, we might simply hack into the lifecycle of mockito mock similar to easy mock (but that's probably going to make java 9 support harder... already expecting trouble there)