pmd-lang-test / net.sourceforge.pmd.lang.ast.test / kotlin.reflect.KCallable

Extensions for kotlin.reflect.KCallable

shouldBe

infix fun <N, V : N> KCallable<N>.shouldBe(expected: V?): Unit

Extension to add the name of the property to error messages. Use with double colon syntax, eg it::isIntegerLiteral shouldBe true. For properties synthesized from Java getters starting with "get", you have to use the name of the getter instead of that of the generated property (with the get prefix).

shouldEqual

infix fun <N, V : N> KCallable<N>.shouldEqual(expected: V?): Unit

Extension to add the name of a property to error messages.

shouldMatch

infix fun <T> KCallable<T>.shouldMatch(expected: T.() -> Unit): Unit