Skip to content

Commit

Permalink
Add reified support for refEq like other matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
pablisco committed Feb 27, 2019
1 parent efccc0b commit ffaddbb
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -133,7 +133,7 @@ fun <T : Any> notNull(): T? {
* Object argument that is reflection-equal to the given value with support for excluding
* selected fields from a class.
*/
fun <T> refEq(value: T, vararg excludeFields: String): T? {
return Mockito.refEq(value, *excludeFields)
inline fun <reified T : Any> refEq(value: T, vararg excludeFields: String): T {
return Mockito.refEq<T>(value, *excludeFields) ?: createInstance()
}

0 comments on commit ffaddbb

Please sign in to comment.