All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.specs2.mock.mockito.ArgThat.scala Maven / Gradle / Ivy

There is a newer version: 4.10.6
Show newest version
package org.specs2
package mock
package mockito


trait ArgThat {

  /** allows to use a specs matcher to match parameters by encapsulating it as a Hamcrest matcher. */
  implicit def argThat[T, U <: T](m: org.specs2.matcher.Matcher[U]): T = org.mockito.Matchers.argThat(new org.specs2.mock.HamcrestMatcherAdapter(m))

  /** allows to use a hamcrest matchers to match parameters. */
  def anArgThat[T, U <: T](m: org.hamcrest.Matcher[U]): T = org.mockito.Matchers.argThat(m)

}

object ArgThat extends ArgThat




© 2015 - 2025 Weber Informatics LLC | Privacy Policy