-
Unit Test What is Mocking? and Why?
In simple, mocking is creating objects that mimic the behavior of real objects. Refer to the following case study :
Date: 2019-08-17 View: 1520
-
Spring Boot + JUnit 5 + Mockito
In this article, we will show you how to do Spring Boot 2 integration test with JUnit 5, and also Mockito.
Date: 2019-08-11 View: 1520
-
Mockito when() requires an argument which has to be a method call on a mock
Run the following Spring Boot + JUnit 5 + Mockito integration test.
Date: 2019-08-11 View: 1520
-
Mockito How to mock repository findById thenReturn() Optional?
Try to mock a repository findById method, but no idea use thenReturn() to return an object, as it accepts an Optional?
Date: 2019-08-11 View: 1520
-
Spring + Mockito Unable to mock save method?
Try to mock a repository save() method, but it is always returning null?
Date: 2019-08-11 View: 1520