- Sep 29, 2004
- 18,656
- 67
- 91
Both seem about equal with there own pros and cons. Seems like they are significantly similar in terms of what they can do when configured to do what you want. Most differences are related to the strict and nice behaviors which both projects handle. EasyMock is more powerful but Mokito is sinmpler to use.
EasyMock can handle expected calls better and Mokito can not (not that I'd use this functionlaity) handle this notion. This is referring to the fact that you can test for Foo.bar() being called exactly 4 times. The check for being called exactly 4 times is handled by EasyMock but not Mokito. (unless this has changed with newer version)
And as a side note I am using PowerMock to extend the behaviors that EasyMock and Mokito do not handle. In my case, I need to mock static methods and this requires Powermock.
I just want to hear some of the thoughts by those that have used these projects for unit testing purposes.
EasyMock can handle expected calls better and Mokito can not (not that I'd use this functionlaity) handle this notion. This is referring to the fact that you can test for Foo.bar() being called exactly 4 times. The check for being called exactly 4 times is handled by EasyMock but not Mokito. (unless this has changed with newer version)
And as a side note I am using PowerMock to extend the behaviors that EasyMock and Mokito do not handle. In my case, I need to mock static methods and this requires Powermock.
I just want to hear some of the thoughts by those that have used these projects for unit testing purposes.