Use a single MocksControl for multiple mock types
Brought to you by:
tammofreese
It would be convenient if we could use a single mock control to simultaneously control nice, default and strict mocks simultaneously.
It is common for our unit tests to want to use different mock types in a single test. For example, we might inject a "nice" logger mock, and a "strict" data-access mock. Since this behavior is not supported by EasyMock's MocksControl class as of EasyMock 2.4, we have written our own class to suit our needs (attached).
It would be ideal if there were functionality built into EasyMock which made this custom class unnecessary. This might come either as a modification to MocksControl, or as a new class which extends the functionality of MocksControl.
Our custom "EasyMockMaker" class, which mostly duplicates MocksControl but adds the functionality for multiple mock types
IMocksControl creates related mocks. For instance, they are ordered with one another in case of a strict IMocksControl.
What you want is some kind of mock factory to be able de replay and verify quickly. That's requested a lot. I'm not quite sure of the best way to do so but I'll look into it.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
This feature request appears to be fulfilled by the new EasyMockSupport class. I think this tracker can be closed.