Tests with Kotlin

Introduction Tests are important for software development to ensure qualitz and maintainability. Tests in Kotlin can be done in a very similiar way as in Java. The basic concepts like unittests, integrationtests, mocking, dependency injection, etc can also be applied to Kotlin code. I will use the framework JUnit 5 throughout this tutorial. It is the Java test framework and fully compatible with Kotlin. The first test Kotlin can use the same Annotations Java uses so our first test looks pretty similiar:
Read more...