Created
October 21, 2021 21:45
-
-
Save oliverspryn/1afeb860a649229ab4a5b0012389ea9d to your computer and use it in GitHub Desktop.
The mocking set up of a unit test where the output of one function streams into the parameter of another
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") // Output from here... | |
| whenever(userService.getUrlToAvatarImage("123-456")).thenReturn("https://ddg.co/") // ... feeds into here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment