org.specs2.mock.mockito

CalledMatchers

trait CalledMatchers extends NumberOfTimes with TheMockitoMocker with Expectations

This trait provides methods to declare expectations on mock calls: there was one(mockedList).get(0) there was no(mockedList).get(0) there was two(mockedList).get(0) there was three(mockedList).get(0) there was 4.times(mockedList).get(0) there was atLeastOne(mockedList).get(0) there was atLeastTwo(mockedList).get(0) there was atLeastThree(mockedList).get(0) there was atLeast(4)(mockedList).get(0) there was atMostOne(mockedList).get(0) there was atMostTwo(mockedList).get(0) there was atMostThree(mockedList).get(0) there was atMost(4)(mockedList).get(0) It is also possible to use a different wording: there were two(mockedList).get(0) got { two(mockedList).get(0) }

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

Type Members

  1. class Calls extends AnyRef

    class supporting 'was' and 'were' methods to forward mockito calls to the CallsMatcher matcher

  2. class CanBeEqual [T] extends AnyRef

  3. class Descriptible [T] extends AnyRef

  4. case class RangeInt (n: Int) extends Product with Serializable

  5. class RangeIntToTimes extends AnyRef

    class providing a apply method to be able to declare a number of calls: 3.

  6. class ToInOrderMode [T] extends AnyRef

    class defining a then method to declare that calls must be made in a specific order.

Value Members

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def atLeast [T <: AnyRef] (i: Int)(mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    at least n calls made to the mock

  8. def atLeastOne [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    at least 1 call made to the mock

  9. def atLeastThree [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    at least 3 calls made to the mock

  10. def atLeastTwo [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    at least 2 calls made to the mock

  11. def atMost [T <: AnyRef] (i: Int)(mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    at most n calls made to the mock

  12. def atMostOne [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    at most 1 call made to the mock

  13. def atMostThree [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    at most 3 calls made to the mock

  14. def atMostTwo [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    at most 2 calls made to the mock

  15. implicit def canBeEqual [T] (t: ⇒ T): CanBeEqual[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 writting a must_== b

    Attributes
    implicit
    Definition Classes
    Expectations
  16. 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
  17. 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
  18. def clone (): AnyRef

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description

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

    returns

    an Expectable

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

    describe a value with the aka method

    describe a value with the aka method

    Attributes
    implicit
    Definition Classes
    Expectations
  24. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  25. def equals (arg0: Any): Boolean

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

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

    Attributes
    final
    Definition Classes
    AnyRef → Any
  28. def got [T] (t: ⇒ T): MatchResult[T]

    alias for 'there was'

  29. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  30. def inOrder (mocks: AnyRef*): Option[InOrder]

  31. implicit def integerToRange (n: Int): RangeInt

    This implicit definition allows to declare a number of times 3.times

    This implicit definition allows to declare a number of times 3.times

    Attributes
    implicit
    Definition Classes
    NumberOfTimes
  32. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  33. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  34. def no [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    no call made to the mock

  35. def noMoreCallsTo [T <: AnyRef] (mock: T): Unit

    no more calls made to the mock

  36. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  37. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  38. def one [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    one call only made to the mock

  39. implicit def rangeIntToTimes (r: RangeInt): RangeIntToTimes

    implicit definition to be able to declare a number of calls 3.

    implicit definition to be able to declare a number of calls 3.times(m).clear()

    Attributes
    implicit
  40. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  41. def there : Calls

    create an object supporting 'was' and 'were' methods

  42. def three [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    three calls only made to the mock

  43. implicit def toInOrderMode [T] (calls: ⇒ T)(implicit arg0: (T) ⇒ Result): ToInOrderMode[T]

    implicit def supporting calls in order

    implicit def supporting calls in order

    Attributes
    implicit
  44. def toString (): String

    Definition Classes
    AnyRef → Any
  45. def two [T <: AnyRef] (mock: T)(implicit anOrder: Option[InOrder] = inOrder()): T

    two calls only made to the mock

  46. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Expectations

Inherited from TheMockitoMocker

Inherited from NumberOfTimes

Inherited from AnyRef

Inherited from Any