Shervin
05/17/2023, 8:44 AMval p = Person (name='Sam', age= 30)
and there is function that I want to test and returns 'mapped' version of Person, sth like:
val mp = MappedPerson(name, age, someotherParam)
mp shouldBeDerivedFrom* m
(*shouldBeDerivedFrom doesn't exist I'm just writing my thoughts)
I think this can be helpful in layered architecture tests.
Any idea?Adam S
05/17/2023, 9:44 AMshouldBeEqualToComparingFields
which uses reflection and thus requires JVM
but you could always create your own utility function, which is usually what I prefer - it’s a bit more work but it tends to be more understandable and works better in practice
infix fun Person.shouldBeMappedTo(mp: MappedPerson) { TODO() }
Shervin
05/18/2023, 10:44 AM