smali

пятница, 3 августа 2018 г.

can! → Parameterized JUnit4 Unit Tests in Kotlin


http://rossharper.net/2016/02/parameterized-junit4-unit-tests-in-kotlin/

This weekend I’ve been learning a little Kotlin — the (relatively) new JVM language from JetBrains. Once I’d worked my through the “Koans”, I decided to try a simple Code Kata. I chose the Roman Numerals Kata for this exercise. Whilst doing this, I wanted to use a parameterised unit test, and had to figure out how to do that in Kotlin… I wont go into the details of the Kata (read the link if you are interested), but in a nutshell, the goal is to write a program that will convert the Arabic numerals we are accustomed to in the modern world to the representation used by the ancient Romans. For example, you may have noticed Roman Numerals used to denote the year a movie was released: 1977 becomes “MCMLXXVII”.