We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b545c2 commit 456c173Copy full SHA for 456c173
1 file changed
tests/src/test/kotlin/test/OngoingStubbingTest.kt
@@ -215,6 +215,22 @@ class OngoingStubbingTest : TestBase() {
215
expect(result).toBe("argument-result")
216
}
217
218
+ @Test
219
+ fun testOngoingStubbing_doAnswer_withDestructuredArguments() {
220
+ /* Given */
221
+ val mock = mock<Methods> {
222
+ on { varargBooleanResult(any(), any()) } doAnswer { (a: String, b: String) ->
223
+ a == b.trim()
224
+ }
225
226
+
227
+ /* When */
228
+ val result = mock.varargBooleanResult("argument", " argument ")
229
230
+ /* Then */
231
+ expect(result).toBe(true)
232
233
234
@Test
235
fun testMockStubbingAfterCreatingMock() {
236
val mock = mock<Methods>()
0 commit comments