LeoColman
06/10/2020, 7:08 PMwhen I can just use trivial methods from standard library:And also, in my opinion, this is a very weak argument. Why bother using Kotlin if you can write things trivially in Java? Why bother using Java if you can write things trivially in C?
Alex Kuznetsov
06/10/2020, 7:38 PMWhy bother using Kotlin if you can write things trivially in Java?
because I am several times more productive with Kotlin. A smallish effort to learn it pays off in a few days. With "substring".shouldContain("str")
I am just as productive as with assertTrue("substring".contains("str"))
and I've spent/wasted some time to learn it.
Not worth it, for trivial cases at least.LeoColman
06/10/2020, 7:42 PMjust as productive as withPerhaps when writing 10 assertions. Reading them again after some time is what really bites you
.
, every extra word, every extra `()`makes a lot of difference when the time passesAlex Kuznetsov
06/11/2020, 8:12 PMwithClue("Name should be present") { user.name shouldNotBe null }
is clearly much shorter than `assertTrue(user.name.isNotNull(), "Name should be present") ``
of course kotest might have lots of advantages, but is it really terse?