Created
November 24, 2020 16:50
-
-
Save esilverberg/00ea871593a5e712456b0c8b3a1842a7 to your computer and use it in GitHub Desktop.
This file contains 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
// Define the mock | |
single<IMatchApi> { | |
mockk<IMatchApi>(relaxed = true) { | |
every { getMatchStack() } returns Single.just(defaultMatchStack()) | |
} | |
} | |
// inject into tests | |
val matchApi: IMatchApi by inject() | |
// For a given test, adjust behavior accordingly | |
matchApi.apply { | |
every { getMatchStack() } returns Single.just(emptyMatchStack()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment