Created
October 21, 2021 21:52
-
-
Save oliverspryn/64cf682fd7f7bb271e50de3943ae1ed4 to your computer and use it in GitHub Desktop.
The mocking set up of a unit test where the output of one function is not streamed into the input of the next function, but uses a generic matcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| whenever(userService.getUserName()).thenReturn("jsmith") | |
| whenever(userService.getUserId()).thenReturn("123-456") | |
| whenever(userService.getUrlToAvatarImage(any())).thenReturn("https://ddg.co/") // Generic matcher is prone to error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment