Learn several ways to use Kotest to assert that Kotlin objects are of the expected class or subclass.
Also find me here:
Baeldung Author
baeldung
This is the standard author on the site. Most articles are published by individual authors, with their own profiles, but when multiple people have a strong contribution, we publish collectively here.
Here's what I've written (so far):
Baeldung on Kotlin
- All
- Kotlin Basics (19)
- Kotlin Collections (17)
- Testing (14)
- Kotlin Classes and Objects (14)
- Kotlin (11)
- Kotlin Strings (10)
- Spring (9)
- Kotlin-Java Interop (9)
- Libraries (8)
- Kotlin Concurrency (7)
- Asynchronous Programming (7)
- Kotlin Arrays (6)
- Series (5)
- Kotlin Functions (5)
- Kotlin Server-Side (4)
- Kotlin IO (4)
- Patterns (3)
- Kotlin Web (3)
- Kotlin Numbers (3)
- HTTP Client-Side (3)
- Functional Programming (3)
- Persistence (2)
- Algorithms (2)
- Security (1)
- Kotlin Dates (1)
Adding New SourceSet with Gradle Kotlin DSL
Filed under Kotlin
Discover how to add source sets to Gradle builds with the Kotlin DSL, along with tips for using these source sets in your projects.
Convert Between Int and Char in Kotlin
Filed under Kotlin Numbers
Learn several strategies for converting between Ints and Chars in Kotlin.
A Guide to detekt: Static Code Analysis for Kotlin
Filed under Kotlin
Learn how to use detekt for Kotlin-specific static code analysis, including some configuration tips for effective use.
Difference Between Object and Data Class in Kotlin
Filed under Kotlin Classes and Objects
Learn about data class and objects in practice and the differences between them.
Mapping java.util.Optional to T in Kotlin
Filed under Kotlin-Java Interop
Learn how to unwrap java.util.Optional in Kotlin, along with additional strategies for approaching nullability in Kotlin.
Creating a List of Objects in Kotlin
Filed under Kotlin Collections
Explore three common methods for creating lists of objects in Kotlin.
Mutating Arrays in Kotlin
Filed under Kotlin Arrays
Learn some strategies for mutating arrays in place and the tradeoffs from a purely functional approach.
Kotlin Generic Inline Classes
Filed under Kotlin Basics
Explore the generic inline class in Kotlin and learn some powerful ways to use it.