https://kotlinlang.org logo
#mockk
Title
# mockk
a

Alex Kuznetsov

05/01/2020, 5:59 PM
Is there a way to have a multi-line
mockk
statement: I'd like to spread a long statement like the following over several lines:
Copy code
every { <http://myThing.do|myThing.do>() } returns 1 andThenThrows Exception("No way!") andThen 3 andThen 4
the line gets too wide, is there a way to continue it:
Copy code
every { <http://myThing.do|myThing.do>() } returns 1 
  andThenThrows Exception("No way!") 
  andThen 3 
  andThen 4
TIA!
j

jdiaz

05/02/2020, 7:32 PM
There's no way to do it with infix functions but iirc you can still use the dot notation like
returns(1).andThenThrows(...).andThen(3)
and then you can format it as you want
👍 1
a

Alex Kuznetsov

05/18/2020, 9:35 PM
@jdiaz thanks a lot
86 Views