I\'ve seen a few questions out there regarding this but I can\'t seem to make sense of any of the answers for my particular problem.
I have a mock object, lets call
If things haven't changed in the last few years, you use expectLastCall
when setting up your expectations.
object1.toggleDisplay();
object.expectLastCall();
object1.toggleDisplay();
EasyMock.expectLastCall().times(5);
or if you import statically the EasyMock
methods:
import static org.easymock.EasyMock.*;
[...]
object1.toggleDisplay();
expectLastCall().times(5);