- What are two common approaches for integrating Kotlin into an existing project?
- Feature first
- Tests first
- What are two advantages to incorporating Kotlin via a test-first approach?
- It can test the interop experience between Java and Kotlin code.
- It doesn't ship the new code to production.
- What is one drawback to incorporating Kotlin via a test-first approach?
- You don't typically get to take full advantage of all Kotlin features.
- How does writing tests with multiple languages improve interop between Java and Kotlin?
- It forces you to exercise your classes and APIs in whichever language they aren't written. This helps highlight pain points in the interop experience.
- What is one way to handle the testing of Kotlin classes that are final by default?
- Using Mockito-Inline
- Using the all-open compiler plugin
- What is the purpose of the kotlin.test package?
- It provides testing utilities and annotations that are platform independent, which can then be used for specific platforms or in multi-platform projects.
- Can you name one Kotlin-focused testing library?