Hello, what is the way to test my ktor client to c...
# ktor
l
Hello, what is the way to test my ktor client to check that the body is serialised to json correctly ?
a
You would receive an exception if the body couldn't be serialized.
l
Ok thanks, So I would need to use the MockEngine in my test en call it. If the call fails it means that something might be wrong with serialisation. Is there way to check value in the json ? like something to get the actual body as string and check values are correct.
a
Do you need to check serialization or deserialization?
l
In this case both ­čÖé One is easy because I can mock the response with a string and check the object is correct. The other one I am not sure how to do.