We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efccc0b commit ffaddbbCopy full SHA for ffaddbb
mockito-kotlin/src/main/kotlin/com/nhaarman/mockitokotlin2/Matchers.kt
@@ -133,7 +133,7 @@ fun <T : Any> notNull(): T? {
133
* Object argument that is reflection-equal to the given value with support for excluding
134
* selected fields from a class.
135
*/
136
-fun <T> refEq(value: T, vararg excludeFields: String): T? {
137
- return Mockito.refEq(value, *excludeFields)
+inline fun <reified T : Any> refEq(value: T, vararg excludeFields: String): T {
+ return Mockito.refEq<T>(value, *excludeFields) ?: createInstance()
138
}
139
0 commit comments