org.specs2.mock.mockito

FunctionArgumentsLowImplicits

trait FunctionArgumentsLowImplicits extends ArgThat with Expectations

This trait allows to specify functions as arguments in mocked methods.

It uses a pair of (arguments, expected result) to specify what was the passed function:

function2.call((i:Int, d: Double) => (i + d).toString) there was one(function2).call((1, 3.0) -> "4.0")

anyFunctionN will just match any function with n arguments

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. FunctionArgumentsLowImplicits
  2. Expectations
  3. CanBeEqual
  4. ArgThat
  5. AnyRef
  6. Any
Visibility
  1. Public
  2. All

Type Members

  1. class CanBeEqualExpectation[T] extends AnyRef

  2. class Descriptible[T] extends AnyRef

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def anArgThat[T, U <: T](m: Matcher[U]): T

    allows to use a hamcrest matchers to match parameters.

    allows to use a hamcrest matchers to match parameters.

    Definition Classes
    ArgThat
  7. implicit def argThat[T, U <: T](m: Matcher[U]): T

    allows to use a specs matcher to match parameters by encapsulating it as a Hamcrest matcher.

    allows to use a specs matcher to match parameters by encapsulating it as a Hamcrest matcher.

    Definition Classes
    ArgThat
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. implicit def canBeEqual[T](t: ⇒ T): CanBeEqualExpectation[T]

    A value can be tested against another with the === operator.

    A value can be tested against another with the === operator. It is equivalent to writing a must_== b

    Definition Classes
    CanBeEqual
  10. def checkFailure[T](m: MatchResult[T]): MatchResult[T]

    this method can be overriden to throw exceptions when checking the match result

    this method can be overriden to throw exceptions when checking the match result

    Attributes
    protected
    Definition Classes
    Expectations
  11. def checkResultFailure(r: Result): Result

    this method can be overriden to throw exceptions when checking the result

    this method can be overriden to throw exceptions when checking the result

    Attributes
    protected
    Definition Classes
    Expectations
  12. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def createExpectable[T](t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]

    returns

    an Expectable with a description function

    Definition Classes
    Expectations
  14. def createExpectable[T](t: ⇒ T, alias: (String) ⇒ String): Expectable[T]

    returns

    an Expectable with a description function

    Definition Classes
    Expectations
  15. def createExpectable[T](t: ⇒ T, alias: String): Expectable[T]

    returns

    an Expectable with a description

    Definition Classes
    Expectations
  16. def createExpectable[T](t: ⇒ T): Expectable[T]

    returns

    an Expectable

    Definition Classes
    Expectations
  17. def createExpectableWithShowAs[T](t: ⇒ T, showAs: ⇒ String): Expectable[T]

    returns

    an Expectable with a function to show the element T

    Definition Classes
    Expectations
  18. implicit def describe[T](t: ⇒ T): Descriptible[T]

    describe a value with the aka method

    describe a value with the aka method

    Definition Classes
    Expectations
  19. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  21. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def matchResultToResult[T](m: MatchResult[T]): Result

    this method can be overriden to intercept the transformation of a MatchResult to a Result

    this method can be overriden to intercept the transformation of a MatchResult to a Result

    Attributes
    protected
    Definition Classes
    Expectations
  26. implicit def matcherToPartialFunctionCall[A, R](values: (A, Matcher[R])): PartialFunction[A, R]

  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  30. def partialCallMatching[A, R](a: A, m: Matcher[R]): PartialFunction[A, R]

  31. def partialFunctionCall[A, R](a: A, r: R): PartialFunction[A, R]

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. implicit def toPartialFunctionCall[A, R](values: (A, R)): PartialFunction[A, R]

  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Expectations

Inherited from CanBeEqual

Inherited from ArgThat

Inherited from AnyRef

Inherited from Any