Does anyone use Spock to test Kotlin code? If o, h...
# announcements
j
Does anyone use Spock to test Kotlin code? If o, how do you create immutable data classes. I really would not want to pass 10 parameters via constructor 😞
m
jakub.dyszkiewicz: @pawel_byszewski
j
I could just hide that behind factory extension function i guess...
e
maybe default values?
m
That's what I do when not even using spock.
Just factory functions. No need them to be extensions.
Just like here (but I would split that into multiple lines, cause it's too long).
j
yeah, extension is overkill
that’s actually will do, thanks! 🙂
p
IMHO there is not any nice way to do this
default values do not affect groovy code
in byte code Kotlin puts default values to every method/constructor call