Browsed by
Tag: mockito

Mockito for beginners

Mockito for beginners

Mockito for beginners: Mockito is an open source testing framework, and it is a widely used for junit testing with mocking beans/repositories in frameworks such as spring mvc & spring boot. The framework allows the creation of test double objects in automated unit tests for the purpose of test-driven development or behavior-driven development. The framework’s name and logo are a play on mojitos, a type of drink. How to Mock void method ? doNothing().when(couponRepository).deleteAll(Mockito.any()); Note: deleteAll is a void method….

Read More Read More

660 total views, no views today