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.
- Host: GitHub
- URL: https://github.com/shaikrasheed99/sharing-is-caring
- Owner: shaikrasheed99
- Created: 2022-04-08T17:24:11.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-09T17:52:59.000Z (over 3 years ago)
- Last Synced: 2025-01-13T19:39:04.272Z (9 months ago)
- Topics: mock, mockito, mockito-junit-test
- Language: Java
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.