user
08/19/2021, 12:48 PMRobert Jaros
08/20/2021, 6:37 AMnilTheDev
08/21/2021, 3:58 PMReflection
using Kotlin
. Well suited for those who have never heard of reflection. Any feedback is welcome.
https://levelup.gitconnected.com/understanding-reflection-using-kotlin-a5874bf63010Shalu TD
08/21/2021, 5:19 PMBig Chungus
08/21/2021, 5:23 PMcommonTest
. This is achieved via kotlin compiler plugin that injects relevant keys and paths to store and read assertion values during compilation.
It's also test framework agnostic and exposes sufficient configuration for you to write your own klip assertion functions. Here's a little preview:
class MyTest {
data class DomainObject(val name: String, val value: String?)
@Test
fun test1() {
assertMatchesClip(DomainObject("Dick", "Dickens"))
DomainObject("John", "Doe").assertKlip()
}
@Test
fun test2() {
doAssertions()
}
private fun doAssertions() {
assertMatchesClip(DomainObject("Joe", "Mama"))
DomainObject("Ben", "Dover").assertKlip()
}
}
It's still in preview as not all "testable" kotlin targets are implemented yet, but please give it a go and get back to me with your thoughts.
Happy coding!Jakob Löhnertz
08/22/2021, 7:11 AMBig Chungus
08/22/2021, 2:17 PMKatarzyna
08/23/2021, 8:51 AMCh8n
08/24/2021, 6:33 AMSid Patil
08/24/2021, 9:23 AMrajesh
08/24/2021, 2:43 PMAyfri
08/24/2021, 3:46 PMuser
08/25/2021, 9:28 AMkpgalligan
08/26/2021, 1:03 PMuser
08/26/2021, 3:28 PMBig Chungus
08/26/2021, 4:39 PMAlejo
08/27/2021, 2:51 PMhallvard
08/27/2021, 5:13 PMBig Chungus
08/30/2021, 7:24 PMOvsyannikov Alexey
08/31/2021, 5:18 AMLeonid
08/31/2021, 1:37 PMuser
08/31/2021, 3:08 PMCicero
08/31/2021, 4:37 PMuser
09/01/2021, 2:58 PMuser
09/02/2021, 9:28 AMVitaliy Zarubin
09/04/2021, 2:06 PMuser
09/07/2021, 3:38 PMKatarzyna
09/08/2021, 8:24 AMOvsyannikov Alexey
09/08/2021, 6:45 PMuser
09/09/2021, 2:18 PM