Bence Erős
10/02/2022, 5:57 PMdave
10/02/2022, 5:58 PMhfhbd
10/02/2022, 6:41 PMkotlin("test")
, which is basically a JUnit wrapper on JVM and supports the same syntax on other targets too. I really like the diff viewer in IntelliJ.PoisonedYouth
10/02/2022, 7:39 PMnfrankel
10/02/2022, 7:52 PMJacob
10/03/2022, 5:29 AMMarit van Dijk
10/03/2022, 6:50 AMMarit van Dijk
10/03/2022, 6:51 AMKlitos Kyriacou
10/03/2022, 8:01 AMnfrankel
10/03/2022, 8:12 AMkqr
10/03/2022, 8:12 AMKlitos Kyriacou
10/03/2022, 8:25 AMchristophsturm
10/03/2022, 10:30 AMMikael Ståldal
10/03/2022, 6:49 PMYou might be asking, "If AssertJ already exists, why create another library?". It's true, assertk is very similar to AssertJ. But assertk is written in Kotlin so it has one major advantage: extension methods. This makes adding your own assertion methods far simpler.
Jilles van Gurp
10/05/2022, 9:08 AMrocketraman
10/06/2022, 12:42 PMchristophsturm
10/06/2022, 1:04 PMassert(users.first().email.contains("@google"))
christophsturm
10/06/2022, 1:07 PMorNull()
and write it like this assert(users.firstOrNull()?.email?.contains("@google"))
because you don’t want your assert to throwrocketraman
10/06/2022, 1:09 PMwakingrufus
10/06/2022, 1:19 PMas
method call for assertion messageschristophsturm
10/06/2022, 1:24 PMrocketraman [3:09 PM]
Any downsides you’ve encountered with that approach vs assertion DSLs? (edited)the only thing that I’m currently not sure about is what’s the best way to do collection asserts, I just started a discussion about it today on the powerassert github project https://github.com/bnorm/kotlin-power-assert/discussions/74
christophsturm
10/06/2022, 1:26 PMwakingrufus
10/06/2022, 1:29 PM