From d514751ffd5f8e5ea6f35c1837235d29d995b428 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 17 Mar 2022 16:52:37 +0000 Subject: [PATCH] avoiding shadowed lambda parameters --- .../im/vector/app/test/fakes/FakeRegisterActionHandler.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vector/src/test/java/im/vector/app/test/fakes/FakeRegisterActionHandler.kt b/vector/src/test/java/im/vector/app/test/fakes/FakeRegisterActionHandler.kt index 6c01779a02..3122e29c3b 100644 --- a/vector/src/test/java/im/vector/app/test/fakes/FakeRegisterActionHandler.kt +++ b/vector/src/test/java/im/vector/app/test/fakes/FakeRegisterActionHandler.kt @@ -28,15 +28,15 @@ class FakeRegisterActionHandler { val instance = mockk() fun givenResultFor(wizard: RegistrationWizard, action: RegisterAction, result: RegistrationResult) { - coEvery { instance.handleRegisterAction(wizard, action) } answers { - it.invocation.args.first() + coEvery { instance.handleRegisterAction(wizard, action) } answers { call -> + call.invocation.args.first() result } } fun givenResultsFor(wizard: RegistrationWizard, result: List>) { - coEvery { instance.handleRegisterAction(wizard, any()) } answers { - val actionArg = it.invocation.args[1] as RegisterAction + coEvery { instance.handleRegisterAction(wizard, any()) } answers { call -> + val actionArg = call.invocation.args[1] as RegisterAction result.first { it.first == actionArg }.second } }