trait MockitoSugar extends MockitoEnhancer with DoSomething with Verifications with Rest
- Alphabetic
- By Inheritance
- MockitoSugar
- Rest
- Verifications
- DoSomething
- MockitoEnhancer
- MockCreator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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, doargumentCaptor[SomeClass]
instead ofArgumentCaptor.forClass(classOf[SomeClass])
Delegates to
ArgumentCaptor.forClass(type: Class[T])
It provides a nicer API as you can, for instance, doargumentCaptor[SomeClass]
instead ofArgumentCaptor.forClass(classOf[SomeClass])
- Definition Classes
- Rest
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
atLeast(minNumberOfInvocations: Int): VerificationMode
Delegates to
Mockito.atLeast()
, it's only here to expose the full Mockito APIDelegates to
Mockito.atLeast()
, it's only here to expose the full Mockito API- Definition Classes
- Verifications
-
def
atLeastOnce: VerificationMode
Delegates to
Mockito.atLeastOnce()
, it removes the parenthesis to have a cleaner APIDelegates to
Mockito.atLeastOnce()
, it removes the parenthesis to have a cleaner API- Definition Classes
- Verifications
-
def
atMost(maxNumberOfInvocations: Int): VerificationMode
Delegates to
Mockito.atMost()
, it's only here to expose the full Mockito APIDelegates to
Mockito.atMost()
, it's only here to expose the full Mockito API- Definition Classes
- Verifications
-
def
calls(wantedNumberOfInvocations: Int): VerificationMode
Delegates to
Mockito.calls()
, it's only here to expose the full Mockito APIDelegates to
Mockito.calls()
, it's only here to expose the full Mockito API- Definition Classes
- Verifications
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
doAnswer[T](f: (InvocationOnMock) ⇒ T): Stubber
Delegates to
Mockito.doAnswer()
, it's only here to expose the full Mockito APIDelegates to
Mockito.doAnswer()
, it's only here to expose the full Mockito API- Definition Classes
- DoSomething
-
def
doCallRealMethod: Stubber
Delegates to
Mockito.doCallRealMethod()
, it removes the parenthesis to have a cleaner APIDelegates to
Mockito.doCallRealMethod()
, it removes the parenthesis to have a cleaner API- Definition Classes
- DoSomething
-
def
doNothing: Stubber
Delegates to
Mockito.doNothing()
, it removes the parenthesis to have a cleaner APIDelegates to
Mockito.doNothing()
, it removes the parenthesis to have a cleaner API- Definition Classes
- DoSomething
-
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 sideDelegates the call to
Mockito.doReturn(toBeReturned, toBeReturnedNext)
but fixes the following compiler issue that happens because the overloaded vararg on the Java sideError:(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
-
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
-
def
doThrow(toBeThrown: Throwable*): Stubber
Delegates to
Mockito.doThrow
, it's only here so we expose all the Mockito API on a single placeDelegates to
Mockito.doThrow
, it's only here so we expose all the Mockito API on a single place- Definition Classes
- DoSomething
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
ignoreStubs(mocks: AnyRef*): Array[AnyRef]
Delegates to
Mockito.ignoreStubs()
, it's only here to expose the full Mockito APIDelegates to
Mockito.ignoreStubs()
, it's only here to expose the full Mockito API- Definition Classes
- Rest
-
def
inOrder(mocks: AnyRef*): InOrder
Delegates to
Mockito.inOrder()
, it's only here to expose the full Mockito APIDelegates to
Mockito.inOrder()
, it's only here to expose the full Mockito API- Definition Classes
- Rest
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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, domock[MyClass](name)
instead ofmock(classOf[MyClass], name)
Delegates to
Mockito.mock(type: Class[T], name: String)
It provides a nicer API as you can, for instance, domock[MyClass](name)
instead ofmock(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 likeverify(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
-
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, domock[MyClass](mockSettings)
instead ofmock(classOf[MyClass], mockSettings)
Delegates to
Mockito.mock(type: Class[T], mockSettings: MockSettings)
It provides a nicer API as you can, for instance, domock[MyClass](mockSettings)
instead ofmock(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 likeverify(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
-
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, domock[MyClass](defaultAnswer)
instead ofmock(classOf[MyClass], defaultAnswer)
Delegates to
Mockito.mock(type: Class[T], defaultAnswer: Answer[_])
It provides a nicer API as you can, for instance, domock[MyClass](defaultAnswer)
instead ofmock(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 likeverify(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
-
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, domock[MyClass]
instead ofmock(classOf[MyClass])
Delegates to
Mockito.mock(type: Class[T])
It provides a nicer API as you can, for instance, domock[MyClass]
instead ofmock(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 likeverify(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
-
def
mockingDetails(toInspect: AnyRef): MockingDetails
Delegates to
Mockito.mockingDetails()
, it's only here to expose the full Mockito APIDelegates to
Mockito.mockingDetails()
, it's only here to expose the full Mockito API- Definition Classes
- MockitoEnhancer
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
never: VerificationMode
Delegates to
Mockito.never()
, it removes the parenthesis to have a cleaner APIDelegates to
Mockito.never()
, it removes the parenthesis to have a cleaner API- Definition Classes
- Verifications
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
only: VerificationMode
Delegates to
Mockito.only()
, it removes the parenthesis to have a cleaner APIDelegates to
Mockito.only()
, it removes the parenthesis to have a cleaner API- Definition Classes
- Verifications
-
def
reset(mocks: AnyRef*): Unit
Delegates to
Mockito.reset(T... mocks)
, but restores the default stubs that deal with default argument valuesDelegates to
Mockito.reset(T... mocks)
, but restores the default stubs that deal with default argument values- Definition Classes
- MockitoEnhancer
-
def
spy[T](realObj: T): T
Delegates to
Mockito.spy()
, it's only here to expose the full Mockito APIDelegates to
Mockito.spy()
, it's only here to expose the full Mockito API- Definition Classes
- Rest
-
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
-
def
stubMock[T](mock: T): T
- Definition Classes
- MockitoSugar → MockitoEnhancer
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
timeout(millis: Int): VerificationWithTimeout
Delegates to
Mockito.timeout()
, it's only here to expose the full Mockito APIDelegates to
Mockito.timeout()
, it's only here to expose the full Mockito API- Definition Classes
- Verifications
-
def
times(wantedNumberOfInvocations: Int): VerificationMode
Delegates to
Mockito.times()
, it's only here to expose the full Mockito APIDelegates to
Mockito.times()
, it's only here to expose the full Mockito API- Definition Classes
- Verifications
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
validateMockitoUsage(): Unit
Delegates to
Mockito.validateMockitoUsage()
, it's only here to expose the full Mockito APIDelegates to
Mockito.validateMockitoUsage()
, it's only here to expose the full Mockito API- Definition Classes
- Rest
-
def
verify[T](mock: T, mode: VerificationMode): T
Delegates to
Mockito.verify()
, it's only here to expose the full Mockito APIDelegates to
Mockito.verify()
, it's only here to expose the full Mockito API- Definition Classes
- Rest
-
def
verify[T](mock: T): T
Delegates to
Mockito.verify()
, it's only here to expose the full Mockito APIDelegates to
Mockito.verify()
, it's only here to expose the full Mockito API- Definition Classes
- Rest
-
def
verifyNoMoreInteractions(mocks: AnyRef*): Unit
Delegates to
Mockito.verifyNoMoreInteractions(Object... mocks)
, but ignores the default stubs that deal with default argument valuesDelegates to
Mockito.verifyNoMoreInteractions(Object... mocks)
, but ignores the default stubs that deal with default argument values- Definition Classes
- MockitoEnhancer
-
def
verifyZeroInteractions(mocks: AnyRef*): Unit
Delegates to
Mockito.verifyZeroInteractions()
, it's only here to expose the full Mockito APIDelegates to
Mockito.verifyZeroInteractions()
, it's only here to expose the full Mockito API- Definition Classes
- Rest
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
when[T](methodCall: T): OngoingStubbing[T]
Delegates to
Mockito.when()
, it's only here to expose the full Mockito APIDelegates to
Mockito.when()
, it's only here to expose the full Mockito API- Definition Classes
- Rest
-
def
withSettings: MockSettings
Delegates to
Mockito.withSettings()
, it's only here to expose the full Mockito APIDelegates to
Mockito.withSettings()
, it's only here to expose the full Mockito API- Definition Classes
- MockitoEnhancer