Mika Y Kost
06/11/2019, 7:11 AMaandreyev
06/11/2019, 10:12 AMMike
06/11/2019, 12:26 PMMike
06/11/2019, 12:26 PMMika Y Kost
06/11/2019, 12:29 PMMike
06/11/2019, 12:35 PMMika Y Kost
06/11/2019, 12:44 PMMika Y Kost
06/11/2019, 12:44 PMsam
06/11/2019, 1:30 PMMike
06/11/2019, 1:51 PMsam
06/11/2019, 2:01 PMMike
06/11/2019, 2:17 PMf
and x
worked most of the time, but I’d occasionally get complaints about duplicate classes from compiler, and only option seemed to be a clean.sam
06/11/2019, 3:30 PMMike
06/11/2019, 5:49 PMassertThat
, the IDE gives great help.
KT has some helpers that AssertJ doesn’t have because of it’s Kotlin focus (Arrow being one), but AssertJ seems to me that it has deeper, and more powerful, assertions.
Collections, extracting properties from collections and comparing based on that.
Comparing POJOs recursively, ignoring certain fields, and other controls.
Comparing files with very helpful messages.
JDK8 Date asserters, although I think KT has this too.
Soft Assertions. i.e. checking a number of assertions and reporting on all of them rather than first one that fails.
AssertJ is a very deep library and keeps growing as it has a large community around it. And I do like KotlinTest’s extension functions. That’s why for my project, I started creating an extension for AssertJ so that one could write actualString shouldBe "Expected Value"
and such. Obviously takes some time, but often one only uses a small subset of assertions, and one can always fall back on direct assertThat
calls.Mike
06/11/2019, 5:52 PMsam
06/11/2019, 6:05 PMsam
06/11/2019, 6:11 PMsam
06/11/2019, 6:16 PMsam
06/11/2019, 6:18 PMassertSoftly { }
. File comparisons too. Overall, yeah assertJ is very nice, a bit better in places and a bit weaker in others.sam
06/11/2019, 6:20 PMsam
06/11/2019, 6:22 PMsam
06/11/2019, 6:22 PMMike
06/11/2019, 6:23 PMMike
06/11/2019, 6:24 PMsam
06/11/2019, 6:24 PMsam
06/11/2019, 6:24 PMsam
06/11/2019, 6:24 PMsam
06/11/2019, 6:25 PMMike
06/11/2019, 6:25 PMMike
06/11/2019, 6:25 PMsam
06/11/2019, 6:25 PMJUnit 5 = JUnit Platform + JUnit Jupiter
from their docssam
06/11/2019, 6:26 PMMike
06/11/2019, 6:26 PMsam
06/11/2019, 6:26 PMMike
06/11/2019, 6:27 PMsam
06/11/2019, 6:27 PMsam
06/11/2019, 6:27 PMsam
06/11/2019, 6:28 PMsam
06/11/2019, 6:29 PMMike
06/11/2019, 6:36 PMsam
06/11/2019, 6:36 PMMike
06/11/2019, 6:39 PMsam
06/11/2019, 6:39 PMMika Y Kost
06/12/2019, 7:03 AMMika Y Kost
06/12/2019, 7:04 AMsam
06/12/2019, 10:24 AMMike
06/12/2019, 12:00 PMdmcg
06/14/2019, 7:48 AMMika Y Kost
06/16/2019, 7:52 AM