An open API service indexing awesome lists of open source software.

https://github.com/shaikrasheed99/sharing-is-caring

Example of mocking using Mockito framework.
https://github.com/shaikrasheed99/sharing-is-caring

mock mockito mockito-junit-test

Last synced: 8 months ago
JSON representation

Example of mocking using Mockito framework.

Awesome Lists containing this project

README

          

# Sharing-is-caring
This is simple scenario to understand how to use mocking in Mockito frameworks.
* The scenario is, there is a good friend, who have a habit of sharing chocolates, when he has more than two.
* To share his chocolates along with his friends, he uses fully tested sharing service.
* To check whether that service is properly used or not, we will simply mock the service.
* Mockito will simply create a mock of the service and let us know whether that mocked service is being used or not.