https://kotlinlang.org logo
#ktor
Title
# ktor
d

dewildte

02/19/2019, 3:10 PM
Is there a good example of unit testing MPP Ktor client using serialization with
MockEngine
?
r

russhwolf

02/19/2019, 3:29 PM
It's a couple months old now but I did a proof-of-concept at https://github.com/russhwolf/ktor-demo
d

dewildte

02/20/2019, 2:52 PM
☝️ That's the kinda thing I was looking for as it includes serilization.
Thanks @russhwolf @Tobi!
👍 1
I got serilization to work in the tests! But sadly it break in common code.
Good thing is that the thing I am building is for the JVM so I will have to leave the whole multiplatform thing for anther time.
r

russhwolf

02/20/2019, 4:23 PM
why is it different between tests and common?
d

dewildte

02/20/2019, 7:57 PM
SomeClass.serializer()
doesnt work
IntelliJ says it can not resolve
.serialzer()
I resorted to just using Gson instead of KotlinxSerializer
5 Views