-
-
Save sukyology/4913a9f81c03c3b4806b60da512c6770 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
interface Foo { | |
fun bar(): Bar | |
} | |
interface Bar { | |
val value: String | |
} | |
class ExampleTest { | |
@Test | |
fun `method chain`() { | |
val foo: Foo = mockk() | |
`every` { foo.bar().value } returns "mock" | |
val bar = foo.bar() | |
assertEquals("mock", bar.value) // success | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment