trait ArgumentMatchersSugar extends AnyMatchers with EqMatchers with EqMatchers_VersionSpecific with ThatMatchers with StringThatMatchers with NullMatchers with FunctionMatchers with NumericMatchers with MacroBasedMatchers

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
MacroBasedMatchers, NumericMatchers, Tolerance, FunctionMatchers, NullMatchers, StringThatMatchers, ThatMatchers, EqMatchers_VersionSpecific, EqMatchers, AnyMatchers, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ArgumentMatchersSugar
  2. MacroBasedMatchers
  3. NumericMatchers
  4. Tolerance
  5. FunctionMatchers
  6. NullMatchers
  7. StringThatMatchers
  8. ThatMatchers
  9. EqMatchers_VersionSpecific
  10. EqMatchers
  11. AnyMatchers
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class PlusOrMinusWrapper[T] extends AnyRef
    Definition Classes
    Tolerance

Value Members

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

    Alias for org.mockito.matchers.MacroBasedMatchers.any

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def any[T](implicit arg0: AnyMatcher[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

    It also fixes the NullPointerException when used on an value class argument (IMPORTANT: YOU MUST PROVIDE THE TYPE FOR VALUE CLASSES)

    Definition Classes
    MacroBasedMatchers
  6. def anyBoolean: Boolean
    Definition Classes
    AnyMatchers
  7. def anyByte: Byte
    Definition Classes
    AnyMatchers
  8. def anyChar: Char
    Definition Classes
    AnyMatchers
  9. def anyDouble: Double
    Definition Classes
    AnyMatchers
  10. def anyFloat: Float
    Definition Classes
    AnyMatchers
  11. def anyInt: Int
    Definition Classes
    AnyMatchers
  12. def anyIterable[T]: Iterable[T]
    Definition Classes
    AnyMatchers
  13. def anyList[T]: List[T]
    Definition Classes
    AnyMatchers
  14. def anyLong: Long
    Definition Classes
    AnyMatchers
  15. def anyMap[K, V]: Map[K, V]
    Definition Classes
    AnyMatchers
  16. def anySeq[T]: Seq[T]
    Definition Classes
    AnyMatchers
  17. def anySet[T]: Set[T]
    Definition Classes
    AnyMatchers
  18. def anyShort: Short
    Definition Classes
    AnyMatchers
  19. def argMatching[T](pf: PartialFunction[Any, Unit]): T
    Definition Classes
    ThatMatchers
  20. def argThat[T](f: (T) ⇒ Boolean, desc: ⇒ String): T
    Definition Classes
    ThatMatchers
  21. def argThat[T](matcher: ArgumentMatcher[T]): T
    Definition Classes
    ThatMatchers
  22. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  23. def booleanThat(matcher: ArgumentMatcher[Boolean]): Boolean
    Definition Classes
    ThatMatchers
  24. def byteThat(matcher: ArgumentMatcher[Byte]): Byte
    Definition Classes
    ThatMatchers
  25. def charThat(matcher: ArgumentMatcher[Char]): Char
    Definition Classes
    ThatMatchers
  26. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  27. def contains(substring: String): String
    Definition Classes
    StringThatMatchers
  28. implicit def convertNumericToPlusOrMinusWrapper[T](pivot: T)(implicit arg0: Numeric[T]): PlusOrMinusWrapper[T]
    Definition Classes
    Tolerance
  29. def doubleThat(matcher: ArgumentMatcher[Double]): Double
    Definition Classes
    ThatMatchers
  30. def endsWith(suffix: String): String
    Definition Classes
    StringThatMatchers
  31. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. def eqTo[T](value: T)(implicit arg0: Equality[T], arg1: ValueClassExtractor[T], arg2: Prettifier): T

    Creates a matcher that delegates on {{org.scalactic.Equality}} so you can always customise how the values are compared Also works with value classes

    Creates a matcher that delegates on {{org.scalactic.Equality}} so you can always customise how the values are compared Also works with value classes

    Definition Classes
    EqMatchers_VersionSpecific
  33. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  34. def floatThat(matcher: ArgumentMatcher[Float]): Float
    Definition Classes
    ThatMatchers
  35. def function0[T](value: T): () ⇒ T
    Definition Classes
    FunctionMatchers
  36. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  37. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  38. def intThat(matcher: ArgumentMatcher[Int]): Int
    Definition Classes
    ThatMatchers
  39. def isA[T](implicit arg0: ClassTag[T]): T
    Definition Classes
    EqMatchers
  40. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  41. def longThat(matcher: ArgumentMatcher[Long]): Long
    Definition Classes
    ThatMatchers
  42. def matches(regex: String): String
    Definition Classes
    StringThatMatchers
  43. val n: N
    Definition Classes
    NumericMatchers
  44. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  47. def refEq[T](value: T, excludeFields: String*): T
    Definition Classes
    EqMatchers
  48. def same[T](value: T): T
    Definition Classes
    EqMatchers
  49. def shortThat(matcher: ArgumentMatcher[Short]): Short
    Definition Classes
    ThatMatchers
  50. def startsWith(prefix: String): String
    Definition Classes
    StringThatMatchers
  51. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  52. def toString(): String
    Definition Classes
    AnyRef → Any
  53. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  55. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def anyVal[T](implicit arg0: AnyMatcher[T]): T

    It was intended to be used instead of any when the argument is a value class, but any now supports value classes so it is not needed anymore

    It was intended to be used instead of any when the argument is a value class, but any now supports value classes so it is not needed anymore

    Definition Classes
    MacroBasedMatchers
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.2) Use 'any[T]' or '*[T]' instead

  2. def eqToVal[T](value: T)(implicit arg0: Equality[T], arg1: ValueClassExtractor[T], arg2: Prettifier): T

    It was intended to be used instead of eqTo when the argument is a value class, but eqTo now supports value classes so it is not needed anymore

    It was intended to be used instead of eqTo when the argument is a value class, but eqTo now supports value classes so it is not needed anymore

    Definition Classes
    EqMatchers_VersionSpecific
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.2) Use 'eqTo' instead

  3. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  4. def isNotNull[T]: T
    Definition Classes
    NullMatchers
    Annotations
    @deprecated
    Deprecated

    (Since version 0.0.0) Using nulls in Scala? you naughty, naughty developer...

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

    (Since version 0.0.0) Using nulls in Scala? you naughty, naughty developer...

Inherited from MacroBasedMatchers

Inherited from NumericMatchers

Inherited from Tolerance

Inherited from FunctionMatchers

Inherited from NullMatchers

Inherited from StringThatMatchers

Inherited from ThatMatchers

Inherited from EqMatchers

Inherited from AnyMatchers

Inherited from AnyRef

Inherited from Any

Ungrouped