Packages

trait MockitoSugar extends MockitoEnhancer with DoSomething with Verifications with Rest

Linear Supertypes
Rest, Verifications, DoSomething, MockitoEnhancer, MockCreator, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MockitoSugar
  2. Rest
  3. Verifications
  4. DoSomething
  5. MockitoEnhancer
  6. MockCreator
  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 argumentCaptor[T](implicit arg0: ClassTag[T]): ArgumentCaptor[T]

    Delegates to ArgumentCaptor.forClass(type: Class[T]) It provides a nicer API as you can, for instance, do argumentCaptor[SomeClass] instead of ArgumentCaptor.forClass(classOf[SomeClass])

    Delegates to ArgumentCaptor.forClass(type: Class[T]) It provides a nicer API as you can, for instance, do argumentCaptor[SomeClass] instead of ArgumentCaptor.forClass(classOf[SomeClass])

    Definition Classes
    Rest
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def atLeast(minNumberOfInvocations: Int): VerificationMode

    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
  7. def atLeastOnce: VerificationMode

    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
  8. def atMost(maxNumberOfInvocations: Int): VerificationMode

    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
  9. def calls(wantedNumberOfInvocations: Int): VerificationMode

    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
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. def doAnswer[T](f: (InvocationOnMock) ⇒ T): Stubber

    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
  12. def doCallRealMethod: Stubber

    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
  13. def doNothing: Stubber

    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
  14. def doReturn[T](toBeReturned: T, toBeReturnedNext: T*): Stubber

    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
  15. def doThrow[T <: Throwable](implicit arg0: ClassTag[T]): Stubber

    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
  16. def doThrow(toBeThrown: Throwable*): Stubber

    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
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def ignoreStubs(mocks: AnyRef*): Array[AnyRef]

    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
  23. def inOrder(mocks: AnyRef*): InOrder

    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
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def mock[T <: AnyRef](name: String)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    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
  26. def mock[T <: AnyRef](mockSettings: MockSettings)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    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
  27. def mock[T <: AnyRef](defaultAnswer: Answer[_])(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    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
  28. def mock[T <: AnyRef](implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    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
  29. def mockingDetails(toInspect: AnyRef): MockingDetails

    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
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. def never: VerificationMode

    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
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. def only: VerificationMode

    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
  35. def reset(mocks: AnyRef*): Unit

    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
  36. def spy[T](realObj: T): T

    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
  37. def spyLambda[T <: AnyRef](realObj: T)(implicit arg0: ClassTag[T]): T

    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
  38. def stubMock[T](mock: T): T
    Definition Classes
    MockitoSugar → MockitoEnhancer
  39. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  40. def timeout(millis: Int): VerificationWithTimeout

    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
  41. def times(wantedNumberOfInvocations: Int): VerificationMode

    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
  42. def toString(): String
    Definition Classes
    AnyRef → Any
  43. def validateMockitoUsage(): Unit

    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
  44. def verify[T](mock: T, mode: VerificationMode): T

    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
  45. def verify[T](mock: T): T

    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
  46. def verifyNoMoreInteractions(mocks: AnyRef*): Unit

    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
  47. def verifyZeroInteractions(mocks: AnyRef*): Unit

    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
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  51. def when[T](methodCall: T): OngoingStubbing[T]

    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
  52. def withSettings: MockSettings

    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 Rest

Inherited from Verifications

Inherited from DoSomething

Inherited from MockitoEnhancer

Inherited from MockCreator

Inherited from AnyRef

Inherited from Any

Ungrouped