Hong Phuc
12/22/2024, 7:08 AMStephan Schröder
12/22/2024, 10:05 AM@Test fun testThisThing() {...}
you can name it
@Test fun `test this thing`() {...}
I generally use
• kotlin-test as assertion lib on top of TestNG or JUnit5 on the JVM (but if you write a multi-platform app you probably want to look into kotest ) The nice thing with kotlin-test assertions are (compared to an assertion lib from Java) that the compiler understands that a variable that passes assertNotNull(..)
can be smart-cast to its non-null type and everything after fail(..)
is dead code.
• mockk intead of mockito for mockingJohann Pardanaud
12/22/2024, 12:28 PMHong Phuc
12/27/2024, 3:29 AM