A
A
andreycha2011-05-28 00:58:15
Java
andreycha, 2011-05-28 00:58:15

Mock framework for Java?

I watched the reviews, Mockito looks nice, but my hands haven't gotten around to trying it yet.
Any advice from your experience? Pros-cons-rake?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
vare6gin, 2011-05-29
@vare6gin

I use jmockit, it runs as a machine java agent, it can do everything, for example, redefine classes. Of the minuses: not obvious syntax, mockito is easier.

B
bitterman, 2011-05-29
@bitterman

I use easymock. did not get to the minuses, everything is fine

1
1nd1go, 2011-05-29
@1nd1go

Mockito is somehow easier than easymock. Although I moved to it just from the last one.
True, you also need to use PowerMock in order to be able to wet static methods.

D
dborovikov, 2011-06-07
@dborovikov

Mockito is cool, yes. Only you, this, do not overdo it with mocks. They save when it is already impossible to test the code in a human way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question