But that doesn't do smart casting so if I need to ...
# kotlintest
d
But that doesn't do smart casting so if I need to test properties in a class:
Copy code
val obj: Person? = ....
obj should {
    it shouldNotBe null
    it.name shouldBe "b"
    it.age shouldNotBe 43
}
I don't suppose you use contracts for this (if this is even possible with them?) @LeoColman