Testing Kotlin With Spock, Part 2 – Enum Instance Method
See the original posting on DZone Python
enum class with an instance method in Kotlin is quite similar to its Java version, but they look a bit different in the bytecode. Let’s see the difference by writing some tests using Spock.
What Do We Want to Test?
Let’s see the code that we want to test: