@@ -7,8 +7,6 @@ import assertk.all
77import assertk.assertions.support.appendName
88import assertk.assertions.support.expected
99import assertk.assertions.support.show
10- import java.lang.reflect.InvocationTargetException
11- import kotlin.reflect.KCallable
1210import kotlin.reflect.KClass
1311import kotlin.reflect.KProperty1
1412import kotlin.reflect.full.IllegalCallableAccessException
@@ -68,32 +66,6 @@ fun <T : Any> Assert<T>.isNotInstanceOf(jclass: Class<out T>) = given { actual -
6866 expected(" to not be instance of:${show(jclass)} " )
6967}
7068
71- /* *
72- * Returns an assert that asserts on the given property.
73- * @param callable The function to get the property value out of the value of the current assert. The name of this
74- * callable will be shown in failure messages.
75- *
76- * ```
77- * assertThat(person).prop(Person::name).isEqualTo("Sue")
78- * ```
79- *
80- * @see prop
81- */
82- @Deprecated(
83- " Use an overload with explicit name and extract" ,
84- ReplaceWith (" this.prop(\" NAME\" ) { callable.call(it) }" , " assertk.assertions.prop" ),
85- level = DeprecationLevel .ERROR
86- )
87- @Suppress(" SwallowedException" )
88- fun <T , P > Assert<T>.prop (callable : KCallable <P >) = prop(callable.name) {
89- try {
90- callable.call(it)
91- } catch (e: InvocationTargetException ) {
92- // unwrap cause for a more helpful error message.
93- throw e.cause!!
94- }
95- }
96-
9769/* *
9870 * Like [isEqualTo] but reports exactly which properties differ. Only supports data classes. Note: you should
9971 * _not_ use this if your data class has a custom [Any.equals] since it can be misleading.
0 commit comments