| Author |
Is Mockito like Junit?
|
Rogerio Kioshi
Ranch Hand
Joined: Apr 12, 2005
Posts: 655
|
|
|
I'd like to know if Mockito does the same thing JUnit does.
|
SCEA 5 (part 1), SCBCD, SCWCD, SCJP, CLP, CLS
|
 |
Tomek Kaczanowski
author
Ranch Hand
Joined: Oct 26, 2005
Posts: 39
|
|
Hi Rogerio,
the short answer is: no.
JUnit is a framework for writing and running tests (especially unit tests).
Mockito allows to create mocks (test doubles) which can replace real collaborators of a class, thus making it possible to implement some test cases.
JUnit and Mockito are often used together. JUnit is used to create the structure of test, while Mockito allow to specify some details of tests within the framework imposed by JUnit.
Please see http://junit.org and http://mockito.org for more information.
|
Tomek Kaczanowski
Book author: Practical Unit Testing with TestNG and Mockito
http://practicalunittesting.com
|
 |
 |
|
|
subject: Is Mockito like Junit?
|
|
|