org.mockito.matchers.EqMatchers.scala Maven / Gradle / Ivy
The newest version!
package org.mockito
package matchers
import org.mockito.{ ArgumentMatchers => JavaMatchers }
import scala.reflect.ClassTag
private[mockito] trait EqMatchers {
/**
* Delegates to ArgumentMatchers.same()
, it's only here so we expose all the `ArgumentMatchers` on a single place
*/
def same[T](value: T): T = JavaMatchers.same(value)
/**
* Delegates to ArgumentMatchers.isA(type: Class[T])
It provides a nicer API as you can, for instance, do isA[String] instead of isA(classOf[String])
*/
def isA[T: ClassTag]: T = JavaMatchers.isA(clazz)
/**
* Delegates to ArgumentMatchers.refEq()
, it's only here so we expose all the `ArgumentMatchers` on a single place
*/
def refEq[T](value: T, excludeFields: String*): T = JavaMatchers.refEq(value, excludeFields: _*)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy