Packages

trait ArgumentMatchersSugar extends AnyMatchers with EqMatchers with ThatMatchers with StringThatMatchers with NullMatchers

Trait that provides some syntax sugar and type mapping.

It mostly forwards the calls to org.mockito.ArgumentMatchers, but with a few improvements to make it more scala-like It also renames the "eq" matcher to "eqTo" as in Scala "eq" is a keyword used to do object identity equality

Linear Supertypes
NullMatchers, StringThatMatchers, ThatMatchers, EqMatchers, AnyMatchers, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ArgumentMatchersSugar
  2. NullMatchers
  3. StringThatMatchers
  4. ThatMatchers
  5. EqMatchers
  6. AnyMatchers
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def any[T]: T

    Delegates to ArgumentMatchers.any(), it's main purpose is to remove the () out of the method call, if you try to do that directly on the test you get this error

    Delegates to ArgumentMatchers.any(), it's main purpose is to remove the () out of the method call, if you try to do that directly on the test you get this error

    Error:(71, 46) polymorphic expression cannot be instantiated to expected type; found : [T]()T required: String when you try to something like ArgumentMatchers.any

    Definition Classes
    AnyMatchers
  5. def anyBoolean: Boolean

    Delegates to ArgumentMatchers.anyBoolean(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Delegates to ArgumentMatchers.anyBoolean(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Definition Classes
    AnyMatchers
  6. def anyByte: Byte

    Delegates to ArgumentMatchers.anyByte(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Delegates to ArgumentMatchers.anyByte(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Definition Classes
    AnyMatchers
  7. def anyChar: Char

    Delegates to ArgumentMatchers.anyChar(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Delegates to ArgumentMatchers.anyChar(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Definition Classes
    AnyMatchers
  8. def anyDouble: Double

    Delegates to ArgumentMatchers.anyDouble(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Delegates to ArgumentMatchers.anyDouble(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Definition Classes
    AnyMatchers
  9. def anyFloat: Float

    Delegates to ArgumentMatchers.anyFloat(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Delegates to ArgumentMatchers.anyFloat(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Definition Classes
    AnyMatchers
  10. def anyInt: Int

    Delegates to ArgumentMatchers.anyInt(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Delegates to ArgumentMatchers.anyInt(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Definition Classes
    AnyMatchers
  11. def anyIterable[T]: Iterable[T]

    Iterable matcher that use Scala Iterable to avoid compile errors like Error:(40, 60) type mismatch; found : Iterable[String] (in java.util) required: Iterable[?] (in scala.collection.immutable)

    Iterable matcher that use Scala Iterable to avoid compile errors like Error:(40, 60) type mismatch; found : Iterable[String] (in java.util) required: Iterable[?] (in scala.collection.immutable)

    when trying to do something like ArgumentMatchers.anyIterable[String]()

    Definition Classes
    AnyMatchers
  12. def anyList[T]: List[T]

    List matcher that use Scala List to avoid compile errors like Error:(40, 60) type mismatch; found : List[String] (in java.util) required: List[?] (in scala.collection.immutable)

    List matcher that use Scala List to avoid compile errors like Error:(40, 60) type mismatch; found : List[String] (in java.util) required: List[?] (in scala.collection.immutable)

    when trying to do something like ArgumentMatchers.anyList[String]()

    Definition Classes
    AnyMatchers
  13. def anyLong: Long

    Delegates to ArgumentMatchers.anyLong(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Delegates to ArgumentMatchers.anyLong(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Definition Classes
    AnyMatchers
  14. def anyMap[K, V]: Map[K, V]

    Map matcher that use Scala Map to avoid compile errors like Error:(40, 60) type mismatch; found : Map[String, String] (in java.util) required: Map[?] (in scala.collection.immutable)

    Map matcher that use Scala Map to avoid compile errors like Error:(40, 60) type mismatch; found : Map[String, String] (in java.util) required: Map[?] (in scala.collection.immutable)

    when trying to do something like ArgumentMatchers.anyMap[String, String]()

    Definition Classes
    AnyMatchers
  15. def anySeq[T]: Seq[T]

    Seq matcher that use Scala Seq to avoid compile errors like Error:(40, 60) type mismatch; found : List[String] (in java.util) required: Seq[?] (in scala.collection.immutable)

    Seq matcher that use Scala Seq to avoid compile errors like Error:(40, 60) type mismatch; found : List[String] (in java.util) required: Seq[?] (in scala.collection.immutable)

    when trying to do something like ArgumentMatchers.anyList[String]()

    Definition Classes
    AnyMatchers
  16. def anySet[T]: Set[T]

    Set matcher that use Scala Set to avoid compile errors like Error:(40, 60) type mismatch; found : Set[String] (in java.util) required: Set[?] (in scala.collection.immutable)

    Set matcher that use Scala Set to avoid compile errors like Error:(40, 60) type mismatch; found : Set[String] (in java.util) required: Set[?] (in scala.collection.immutable)

    when trying to do something like ArgumentMatchers.anySet[String]()

    Definition Classes
    AnyMatchers
  17. def anyShort: Short

    Delegates to ArgumentMatchers.anyShort(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Delegates to ArgumentMatchers.anyShort(), it's only here so we expose all the ArgumentMatchers on a single place as any[T] would do the job just fine

    Definition Classes
    AnyMatchers
  18. def anyVal[T](implicit valueClassMatchers: ValueClassMatchers[T]): T

    Wraps the standard 'any' matcher on the value class provided, this one requires the type to be explicit

    Wraps the standard 'any' matcher on the value class provided, this one requires the type to be explicit

    Definition Classes
    AnyMatchers
  19. def argThat[T](matcher: ArgumentMatcher[T]): T

    Delegates to ArgumentMatchers.argThat(matcher), it's only here so we expose all the ArgumentMatchers on a single place

    Delegates to ArgumentMatchers.argThat(matcher), it's only here so we expose all the ArgumentMatchers on a single place

    Definition Classes
    ThatMatchers
  20. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  21. def booleanThat(matcher: ArgumentMatcher[Boolean]): Boolean

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Definition Classes
    ThatMatchers
  22. def byteThat(matcher: ArgumentMatcher[Byte]): Byte

    Delegates the call to argThat but using the Scala "primitives", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Delegates the call to argThat but using the Scala "primitives", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Definition Classes
    ThatMatchers
  23. def charThat(matcher: ArgumentMatcher[Char]): Char

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Definition Classes
    ThatMatchers
  24. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  25. def contains(substring: String): String

    Delegates to ArgumentMatchers.contains(), it's only here so we expose all the ArgumentMatchers on a single place

    Delegates to ArgumentMatchers.contains(), it's only here so we expose all the ArgumentMatchers on a single place

    Definition Classes
    StringThatMatchers
  26. def doubleThat(matcher: ArgumentMatcher[Double]): Double

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Definition Classes
    ThatMatchers
  27. def endsWith(suffix: String): String

    Delegates to ArgumentMatchers.endsWith(), it's only here so we expose all the ArgumentMatchers on a single place

    Delegates to ArgumentMatchers.endsWith(), it's only here so we expose all the ArgumentMatchers on a single place

    Definition Classes
    StringThatMatchers
  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def eqTo[T](value: T): T

    Delegates to ArgumentMatchers.eq(), it renames the method to eqTo to avoid clashes with the Scala eq method used for reference equality

    Delegates to ArgumentMatchers.eq(), it renames the method to eqTo to avoid clashes with the Scala eq method used for reference equality

    Definition Classes
    EqMatchers
  30. def eqToVal[T](value: Any)(implicit valueClassMatchers: ValueClassMatchers[T]): T

    Wraps the standard 'ArgumentMatchers.eq()' matcher on the value class provided, this one requires the type to be explicit

    Wraps the standard 'ArgumentMatchers.eq()' matcher on the value class provided, this one requires the type to be explicit

    Definition Classes
    EqMatchers
  31. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  32. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  33. def floatThat(matcher: ArgumentMatcher[Float]): Float

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Definition Classes
    ThatMatchers
  34. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. def intThat(matcher: ArgumentMatcher[Int]): Int

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Definition Classes
    ThatMatchers
  37. def isA[T](implicit classTag: ClassTag[T]): T

    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])

    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])

    Definition Classes
    EqMatchers
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. def longThat(matcher: ArgumentMatcher[Long]): Long

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary conversion that would be necessary used the Java version

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary conversion that would be necessary used the Java version

    Definition Classes
    ThatMatchers
  40. def matches(regex: String): String

    Delegates to ArgumentMatchers.matches(), it's only here so we expose all the ArgumentMatchers on a single place

    Delegates to ArgumentMatchers.matches(), it's only here so we expose all the ArgumentMatchers on a single place

    Definition Classes
    StringThatMatchers
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  44. def refEq[T](value: T, excludeFields: String*): T

    Delegates to ArgumentMatchers.refEq(), it's only here so we expose all the ArgumentMatchers on a single place

    Delegates to ArgumentMatchers.refEq(), it's only here so we expose all the ArgumentMatchers on a single place

    Definition Classes
    EqMatchers
  45. def same[T](value: T): T

    Delegates to ArgumentMatchers.same(), it's only here so we expose all the ArgumentMatchers on a single place

    Delegates to ArgumentMatchers.same(), it's only here so we expose all the ArgumentMatchers on a single place

    Definition Classes
    EqMatchers
  46. def shortThat(matcher: ArgumentMatcher[Short]): Short

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Delegates the call to argThat but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version

    Definition Classes
    ThatMatchers
  47. def startsWith(prefix: String): String

    Delegates to ArgumentMatchers.startsWith(), it's only here so we expose all the ArgumentMatchers on a single place

    Delegates to ArgumentMatchers.startsWith(), it's only here so we expose all the ArgumentMatchers on a single place

    Definition Classes
    StringThatMatchers
  48. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  49. def toString(): String
    Definition Classes
    AnyRef → Any
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Deprecated Value Members

  1. def isNotNull[T]: T

    Delegates to ArgumentMatchers.isNotNull(), it's only here so we expose all the ArgumentMatchers on a single place, but marked as @deprecated as you shouldn't be testing for nulls on Scala

    Delegates to ArgumentMatchers.isNotNull(), it's only here so we expose all the ArgumentMatchers on a single place, but marked as @deprecated as you shouldn't be testing for nulls on Scala

    Definition Classes
    NullMatchers
    Annotations
    @deprecated
    Deprecated
  2. def isNull[T]: T

    Delegates to ArgumentMatchers.isNull(), it's only here so we expose all the ArgumentMatchers on a single place, but marked as @deprecated as you shouldn't be testing for nulls on Scala

    Delegates to ArgumentMatchers.isNull(), it's only here so we expose all the ArgumentMatchers on a single place, but marked as @deprecated as you shouldn't be testing for nulls on Scala

    Definition Classes
    NullMatchers
    Annotations
    @deprecated
    Deprecated

Inherited from NullMatchers

Inherited from StringThatMatchers

Inherited from ThatMatchers

Inherited from EqMatchers

Inherited from AnyMatchers

Inherited from AnyRef

Inherited from Any

Ungrouped