This is a simple maven project that implements different features of Mockito framework in simple, easy and understandable way. The project has been created for someone who wishes to understand how to use Mockito in their project. Mockito is an open source testing framework for Java released under the MIT License. The framework allows the creation of mock objects in automated unit tests for the purpose of test-driven development or behavior-driven development.
- Java8 or above
- Maven
- IDE (I recommend eclipse)
- clone the project
- open cmd inside the WorkingImplementationOfMockito folder
- run the below command
mvn clean install
- you are good to go :)
- it is advised to understand the code while reading the JavaTpoint's Mockito Tutorial
- start from src/main/java/PojoClasses -> these classes are the one's that we will be mocking and testing.
- then look into src/test/java/TestingWithoutMockito to understand the limitations without mockito.
- then move to src/test/java/TestingWithMockito to understand the benefits of Mockito as well as get hands on with code implementations
- lastly move to src/test/java/MockitoWithAnnotations to understand how to use annotations in Mockito
-
A Very Brief and concise documentations covering all important points regarding mockito will be made available.
-
don't forget to star and share the project :)