Object/Trait

org.mockito

MockitoSugar

Related Docs: trait MockitoSugar | package mockito

Permalink

object MockitoSugar extends MockitoSugar

Simple object to allow the usage of the trait without mixing it in

Linear Supertypes
MockitoSugar, Rest, Verifications, DoSomething, MockitoEnhancer, MockCreator, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MockitoSugar
  2. MockitoSugar
  3. Rest
  4. Verifications
  5. DoSomething
  6. MockitoEnhancer
  7. MockCreator
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def atLeast(minNumberOfInvocations: Int): VerificationMode

    Permalink

    Delegates to Mockito.atLeast(), it's only here to expose the full Mockito API

    Delegates to Mockito.atLeast(), it's only here to expose the full Mockito API

    Definition Classes
    Verifications
  6. def atLeastOnce: VerificationMode

    Permalink

    Delegates to Mockito.atLeastOnce(), it removes the parenthesis to have a cleaner API

    Delegates to Mockito.atLeastOnce(), it removes the parenthesis to have a cleaner API

    Definition Classes
    Verifications
  7. def atMost(maxNumberOfInvocations: Int): VerificationMode

    Permalink

    Delegates to Mockito.atMost(), it's only here to expose the full Mockito API

    Delegates to Mockito.atMost(), it's only here to expose the full Mockito API

    Definition Classes
    Verifications
  8. def calls(wantedNumberOfInvocations: Int): VerificationMode

    Permalink

    Delegates to Mockito.calls(), it's only here to expose the full Mockito API

    Delegates to Mockito.calls(), it's only here to expose the full Mockito API

    Definition Classes
    Verifications
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def doAnswer[P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R](f: (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  11. def doAnswer[P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, R](f: (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  12. def doAnswer[P0, P1, P2, P3, P4, P5, P6, P7, P8, R](f: (P0, P1, P2, P3, P4, P5, P6, P7, P8) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  13. def doAnswer[P0, P1, P2, P3, P4, P5, P6, P7, R](f: (P0, P1, P2, P3, P4, P5, P6, P7) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  14. def doAnswer[P0, P1, P2, P3, P4, P5, P6, R](f: (P0, P1, P2, P3, P4, P5, P6) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  15. def doAnswer[P0, P1, P2, P3, P4, P5, R](f: (P0, P1, P2, P3, P4, P5) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  16. def doAnswer[P0, P1, P2, P3, P4, R](f: (P0, P1, P2, P3, P4) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  17. def doAnswer[P0, P1, P2, P3, R](f: (P0, P1, P2, P3) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  18. def doAnswer[P0, P1, P2, R](f: (P0, P1, P2) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  19. def doAnswer[P0, P1, R](f: (P0, P1) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  20. def doAnswer[P0, R](f: (P0) ⇒ R): Stubber

    Permalink
    Definition Classes
    DoSomething
  21. def doAnswer[R](f: ⇒ R): Stubber

    Permalink

    Delegates to Mockito.doAnswer(), it's only here to expose the full Mockito API

    Delegates to Mockito.doAnswer(), it's only here to expose the full Mockito API

    Definition Classes
    DoSomething
  22. def doCallRealMethod: Stubber

    Permalink

    Delegates to Mockito.doCallRealMethod(), it removes the parenthesis to have a cleaner API

    Delegates to Mockito.doCallRealMethod(), it removes the parenthesis to have a cleaner API

    Definition Classes
    DoSomething
  23. def doNothing: Stubber

    Permalink

    Delegates to Mockito.doNothing(), it removes the parenthesis to have a cleaner API

    Delegates to Mockito.doNothing(), it removes the parenthesis to have a cleaner API

    Definition Classes
    DoSomething
  24. def doReturn[T](toBeReturned: T, toBeReturnedNext: T*): Stubber

    Permalink

    Delegates the call to Mockito.doReturn(toBeReturned, toBeReturnedNext) but fixes the following compiler issue that happens because the overloaded vararg on the Java side

    Delegates the call to Mockito.doReturn(toBeReturned, toBeReturnedNext) but fixes the following compiler issue that happens because the overloaded vararg on the Java side

    Error:(33, 25) ambiguous reference to overloaded definition,
    both method doReturn in class Mockito of type (x$1: Any, x$2: Object*)org.mockito.stubbing.Stubber
    and  method doReturn in class Mockito of type (x$1: Any)org.mockito.stubbing.Stubber
    match argument types (`Type`)
    Definition Classes
    DoSomething
  25. def doThrow[T <: Throwable](implicit arg0: ClassTag[T]): Stubber

    Permalink

    Delegates to Mockito.doThrow(type: Class[T]) It provides a nicer API as you can, for instance, do doThrow[Throwable] instead of doThrow(classOf[Throwable])

    Delegates to Mockito.doThrow(type: Class[T]) It provides a nicer API as you can, for instance, do doThrow[Throwable] instead of doThrow(classOf[Throwable])

    Definition Classes
    DoSomething
  26. def doThrow(toBeThrown: Throwable*): Stubber

    Permalink

    Delegates to Mockito.doThrow, it's only here so we expose all the Mockito API on a single place

    Delegates to Mockito.doThrow, it's only here so we expose all the Mockito API on a single place

    Definition Classes
    DoSomething
  27. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  32. def ignoreStubs(mocks: AnyRef*): Array[AnyRef]

    Permalink

    Delegates to Mockito.ignoreStubs(), it's only here to expose the full Mockito API

    Delegates to Mockito.ignoreStubs(), it's only here to expose the full Mockito API

    Definition Classes
    Rest
  33. def inOrder(mocks: AnyRef*): InOrder

    Permalink

    Delegates to Mockito.inOrder(), it's only here to expose the full Mockito API

    Delegates to Mockito.inOrder(), it's only here to expose the full Mockito API

    Definition Classes
    Rest
  34. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  35. def mock[T <: AnyRef](name: String)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T], defaultAnswer: DefaultAnswer): T

    Permalink

    Delegates to Mockito.mock(type: Class[T], name: String) It provides a nicer API as you can, for instance, do mock[MyClass](name) instead of mock(classOf[MyClass], name)

    Delegates to Mockito.mock(type: Class[T], name: String) It provides a nicer API as you can, for instance, do mock[MyClass](name) instead of mock(classOf[MyClass], name)

    It also pre-stub the mock so the compiler-generated methods that provide the values for the default arguments are called, ie: given def iHaveSomeDefaultArguments(noDefault: String, default: String = "default value")

    without this fix, if you call it as iHaveSomeDefaultArguments("I'm not gonna pass the second argument") then you could have not verified it like verify(aMock).iHaveSomeDefaultArguments("I'm not gonna pass the second argument", "default value") as the value for the second parameter would have been null...

    Definition Classes
    MockitoEnhancer → MockCreator
  36. def mock[T <: AnyRef](mockSettings: MockSettings)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    Permalink

    Delegates to Mockito.mock(type: Class[T], mockSettings: MockSettings) It provides a nicer API as you can, for instance, do mock[MyClass](mockSettings) instead of mock(classOf[MyClass], mockSettings)

    Delegates to Mockito.mock(type: Class[T], mockSettings: MockSettings) It provides a nicer API as you can, for instance, do mock[MyClass](mockSettings) instead of mock(classOf[MyClass], mockSettings)

    It also pre-stub the mock so the compiler-generated methods that provide the values for the default arguments are called, ie: given def iHaveSomeDefaultArguments(noDefault: String, default: String = "default value")

    without this fix, if you call it as iHaveSomeDefaultArguments("I'm not gonna pass the second argument") then you could have not verified it like verify(aMock).iHaveSomeDefaultArguments("I'm not gonna pass the second argument", "default value") as the value for the second parameter would have been null...

    Definition Classes
    MockitoEnhancer → MockCreator
  37. def mock[T <: AnyRef](defaultAnswer: DefaultAnswer)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    Permalink

    Delegates to Mockito.mock(type: Class[T], defaultAnswer: Answer[_]) It provides a nicer API as you can, for instance, do mock[MyClass](defaultAnswer) instead of mock(classOf[MyClass], defaultAnswer)

    Delegates to Mockito.mock(type: Class[T], defaultAnswer: Answer[_]) It provides a nicer API as you can, for instance, do mock[MyClass](defaultAnswer) instead of mock(classOf[MyClass], defaultAnswer)

    It also pre-stub the mock so the compiler-generated methods that provide the values for the default arguments are called, ie: given def iHaveSomeDefaultArguments(noDefault: String, default: String = "default value")

    without this fix, if you call it as iHaveSomeDefaultArguments("I'm not gonna pass the second argument") then you could have not verified it like verify(aMock).iHaveSomeDefaultArguments("I'm not gonna pass the second argument", "default value") as the value for the second parameter would have been null...

    Definition Classes
    MockitoEnhancer → MockCreator
  38. def mock[T <: AnyRef](implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T], defaultAnswer: DefaultAnswer): T

    Permalink

    Delegates to Mockito.mock(type: Class[T]) It provides a nicer API as you can, for instance, do mock[MyClass] instead of mock(classOf[MyClass])

    Delegates to Mockito.mock(type: Class[T]) It provides a nicer API as you can, for instance, do mock[MyClass] instead of mock(classOf[MyClass])

    It also pre-stub the mock so the compiler-generated methods that provide the values for the default arguments are called, ie: given def iHaveSomeDefaultArguments(noDefault: String, default: String = "default value")

    without this fix, if you call it as iHaveSomeDefaultArguments("I'm not gonna pass the second argument") then you could have not verified it like verify(aMock).iHaveSomeDefaultArguments("I'm not gonna pass the second argument", "default value") as the value for the second parameter would have been null...

    Definition Classes
    MockitoEnhancer → MockCreator
  39. def mockingDetails(toInspect: AnyRef): MockingDetails

    Permalink

    Delegates to Mockito.mockingDetails(), it's only here to expose the full Mockito API

    Delegates to Mockito.mockingDetails(), it's only here to expose the full Mockito API

    Definition Classes
    MockitoEnhancer
  40. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  41. def never: VerificationMode

    Permalink

    Delegates to Mockito.never(), it removes the parenthesis to have a cleaner API

    Delegates to Mockito.never(), it removes the parenthesis to have a cleaner API

    Definition Classes
    Verifications
  42. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  43. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. def only: VerificationMode

    Permalink

    Delegates to Mockito.only(), it removes the parenthesis to have a cleaner API

    Delegates to Mockito.only(), it removes the parenthesis to have a cleaner API

    Definition Classes
    Verifications
  45. def reset(mocks: AnyRef*): Unit

    Permalink

    Delegates to Mockito.reset(T... mocks), but restores the default stubs that deal with default argument values

    Delegates to Mockito.reset(T... mocks), but restores the default stubs that deal with default argument values

    Definition Classes
    MockitoEnhancer
  46. def spy[T](realObj: T): T

    Permalink

    Delegates to Mockito.spy(), it's only here to expose the full Mockito API

    Delegates to Mockito.spy(), it's only here to expose the full Mockito API

    Definition Classes
    Rest → MockCreator
  47. def spyLambda[T <: AnyRef](realObj: T)(implicit arg0: ClassTag[T]): T

    Permalink

    Creates a "spy" in a way that supports lambdas and anonymous classes as they don't work with the standard spy as they are created as final classes by the compiler

    Creates a "spy" in a way that supports lambdas and anonymous classes as they don't work with the standard spy as they are created as final classes by the compiler

    Definition Classes
    Rest → MockCreator
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def timeout(millis: Int): VerificationWithTimeout

    Permalink

    Delegates to Mockito.timeout(), it's only here to expose the full Mockito API

    Delegates to Mockito.timeout(), it's only here to expose the full Mockito API

    Definition Classes
    Verifications
  50. def times(wantedNumberOfInvocations: Int): VerificationMode

    Permalink

    Delegates to Mockito.times(), it's only here to expose the full Mockito API

    Delegates to Mockito.times(), it's only here to expose the full Mockito API

    Definition Classes
    Verifications
  51. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  52. def validateMockitoUsage(): Unit

    Permalink

    Delegates to Mockito.validateMockitoUsage(), it's only here to expose the full Mockito API

    Delegates to Mockito.validateMockitoUsage(), it's only here to expose the full Mockito API

    Definition Classes
    Rest
  53. def verify[T](mock: T, mode: VerificationMode): T

    Permalink

    Delegates to Mockito.verify(), it's only here to expose the full Mockito API

    Delegates to Mockito.verify(), it's only here to expose the full Mockito API

    Definition Classes
    Rest
  54. def verify[T](mock: T): T

    Permalink

    Delegates to Mockito.verify(), it's only here to expose the full Mockito API

    Delegates to Mockito.verify(), it's only here to expose the full Mockito API

    Definition Classes
    Rest
  55. def verifyNoMoreInteractions(mocks: AnyRef*): Unit

    Permalink

    Delegates to Mockito.verifyNoMoreInteractions(Object... mocks), but ignores the default stubs that deal with default argument values

    Delegates to Mockito.verifyNoMoreInteractions(Object... mocks), but ignores the default stubs that deal with default argument values

    Definition Classes
    MockitoEnhancer
  56. def verifyZeroInteractions(mocks: AnyRef*): Unit

    Permalink

    Delegates to Mockito.verifyZeroInteractions(), it's only here to expose the full Mockito API

    Delegates to Mockito.verifyZeroInteractions(), it's only here to expose the full Mockito API

    Definition Classes
    Rest
  57. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def when[T](methodCall: T): ScalaFirstStubbing[T]

    Permalink

    Delegates to Mockito.when(), it's only here to expose the full Mockito API

    Delegates to Mockito.when(), it's only here to expose the full Mockito API

    Definition Classes
    Rest
  61. def withSettings(implicit defaultAnswer: DefaultAnswer): MockSettings

    Permalink

    Delegates to Mockito.withSettings(), it's only here to expose the full Mockito API

    Delegates to Mockito.withSettings(), it's only here to expose the full Mockito API

    Definition Classes
    MockitoEnhancer

Inherited from MockitoSugar

Inherited from Rest

Inherited from Verifications

Inherited from DoSomething

Inherited from MockitoEnhancer

Inherited from MockCreator

Inherited from AnyRef

Inherited from Any

Ungrouped