![]() One provides a suspend function and one provides a callback approach. We have two methods, both providing a way of getting a User. Meaning you only have to write your tests once, rather than writing platform-specific tests. Kotlin provides some common test dependencies to enable you to write multiplatform tests. Implementation ":kotlin-test-annotations-common:$kotlin_version" Implementation ":kotlin-test-common:$kotlin_version" Testing within Kotlin Multiplatform is well supported and will feel very familiar. ![]() I want to ensure the only thing I am testing is the class(es) I intended. I use the Given When Then approach to testing across all our Small, Medium and Large tests. It also needs to work under a variety of conditions. You want to ensure the code you write behaves as expected. A how-to guide on writing tests within Kotlin Multiplatform.
0 Comments
Leave a Reply. |