trait MockitoFixture extends TestSuite with MockitoSugar with ArgumentMatchersSugar
- Alphabetic
- By Inheritance
- MockitoFixture
- ArgumentMatchersSugar
- FunctionMatchers
- NullMatchers
- StringThatMatchers
- ThatMatchers
- EqMatchers
- AnyMatchers
- MockitoSugar
- Verifications
- DoSomething
- MockitoEnhancer
- MockCreator
- TestSuite
- Suite
- Serializable
- Serializable
- Assertions
- TripleEquals
- TripleEqualsSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
AssertionsHelper extends AnyRef
- Definition Classes
- Assertions
-
class
CheckingEqualizer[L] extends AnyRef
- Definition Classes
- TripleEqualsSupport
-
class
Equalizer[L] extends AnyRef
- Definition Classes
- TripleEqualsSupport
-
trait
NoArgTest extends () ⇒ Outcome with TestData
- Attributes
- protected
- Definition Classes
- TestSuite
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
!==[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
- Definition Classes
- TripleEqualsSupport
-
def
!==(right: Null): TripleEqualsInvocation[Null]
- Definition Classes
- TripleEqualsSupport
-
def
!==[T](right: T): TripleEqualsInvocation[T]
- Definition Classes
- TripleEqualsSupport
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
===[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
- Definition Classes
- TripleEqualsSupport
-
def
===(right: Null): TripleEqualsInvocation[Null]
- Definition Classes
- TripleEqualsSupport
-
def
===[T](right: T): TripleEqualsInvocation[T]
- Definition Classes
- TripleEqualsSupport
-
def
any[T]: T
Delegates to
ArgumentMatchers.any()
, it's main purpose is to remove the () out of the method call, if you try to do that directly on the test you get this errorDelegates to
ArgumentMatchers.any()
, it's main purpose is to remove the () out of the method call, if you try to do that directly on the test you get this errorError:(71, 46) polymorphic expression cannot be instantiated to expected type; found : [T]()T required: String when you try to something like ArgumentMatchers.any
- Definition Classes
- AnyMatchers
-
def
anyBoolean: Boolean
Delegates to
ArgumentMatchers.anyBoolean()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fineDelegates to
ArgumentMatchers.anyBoolean()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fine- Definition Classes
- AnyMatchers
-
def
anyByte: Byte
Delegates to
ArgumentMatchers.anyByte()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fineDelegates to
ArgumentMatchers.anyByte()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fine- Definition Classes
- AnyMatchers
-
def
anyChar: Char
Delegates to
ArgumentMatchers.anyChar()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fineDelegates to
ArgumentMatchers.anyChar()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fine- Definition Classes
- AnyMatchers
-
def
anyDouble: Double
Delegates to
ArgumentMatchers.anyDouble()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fineDelegates to
ArgumentMatchers.anyDouble()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fine- Definition Classes
- AnyMatchers
-
def
anyFloat: Float
Delegates to
ArgumentMatchers.anyFloat()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fineDelegates to
ArgumentMatchers.anyFloat()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fine- Definition Classes
- AnyMatchers
-
def
anyInt: Int
Delegates to
ArgumentMatchers.anyInt()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fineDelegates to
ArgumentMatchers.anyInt()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fine- Definition Classes
- AnyMatchers
-
def
anyIterable[T]: Iterable[T]
Iterable matcher that use Scala Iterable to avoid compile errors like Error:(40, 60) type mismatch; found : Iterable[String] (in java.util) required: Iterable[?] (in scala.collection.immutable)
Iterable matcher that use Scala Iterable to avoid compile errors like Error:(40, 60) type mismatch; found : Iterable[String] (in java.util) required: Iterable[?] (in scala.collection.immutable)
when trying to do something like ArgumentMatchers.anyIterable[String]()
- Definition Classes
- AnyMatchers
-
def
anyList[T]: List[T]
List matcher that use Scala List to avoid compile errors like Error:(40, 60) type mismatch; found : List[String] (in java.util) required: List[?] (in scala.collection.immutable)
List matcher that use Scala List to avoid compile errors like Error:(40, 60) type mismatch; found : List[String] (in java.util) required: List[?] (in scala.collection.immutable)
when trying to do something like ArgumentMatchers.anyList[String]()
- Definition Classes
- AnyMatchers
-
def
anyLong: Long
Delegates to
ArgumentMatchers.anyLong()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fineDelegates to
ArgumentMatchers.anyLong()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fine- Definition Classes
- AnyMatchers
-
def
anyMap[K, V]: Map[K, V]
Map matcher that use Scala Map to avoid compile errors like Error:(40, 60) type mismatch; found : Map[String, String] (in java.util) required: Map[?] (in scala.collection.immutable)
Map matcher that use Scala Map to avoid compile errors like Error:(40, 60) type mismatch; found : Map[String, String] (in java.util) required: Map[?] (in scala.collection.immutable)
when trying to do something like ArgumentMatchers.anyMap[String, String]()
- Definition Classes
- AnyMatchers
-
def
anySeq[T]: Seq[T]
Seq matcher that use Scala Seq to avoid compile errors like Error:(40, 60) type mismatch; found : List[String] (in java.util) required: Seq[?] (in scala.collection.immutable)
Seq matcher that use Scala Seq to avoid compile errors like Error:(40, 60) type mismatch; found : List[String] (in java.util) required: Seq[?] (in scala.collection.immutable)
when trying to do something like ArgumentMatchers.anyList[String]()
- Definition Classes
- AnyMatchers
-
def
anySet[T]: Set[T]
Set matcher that use Scala Set to avoid compile errors like Error:(40, 60) type mismatch; found : Set[String] (in java.util) required: Set[?] (in scala.collection.immutable)
Set matcher that use Scala Set to avoid compile errors like Error:(40, 60) type mismatch; found : Set[String] (in java.util) required: Set[?] (in scala.collection.immutable)
when trying to do something like ArgumentMatchers.anySet[String]()
- Definition Classes
- AnyMatchers
-
def
anyShort: Short
Delegates to
ArgumentMatchers.anyShort()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fineDelegates to
ArgumentMatchers.anyShort()
, it's only here so we expose all theArgumentMatchers
on a single place as any[T] would do the job just fine- Definition Classes
- AnyMatchers
-
def
anyVal[T](implicit valueClassMatchers: ValueClassMatchers[T]): T
Wraps the standard 'any' matcher on the value class provided, this one requires the type to be explicit
Wraps the standard 'any' matcher on the value class provided, this one requires the type to be explicit
- Definition Classes
- AnyMatchers
-
def
argThat[T](matcher: ArgumentMatcher[T]): T
Delegates to
ArgumentMatchers.argThat(matcher)
, it's only here so we expose all theArgumentMatchers
on a single placeDelegates to
ArgumentMatchers.argThat(matcher)
, it's only here so we expose all theArgumentMatchers
on a single place- Definition Classes
- ThatMatchers
-
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
- MockitoSugar
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
macro
def
assert(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
-
macro
def
assert(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
-
macro
def
assertCompiles(code: String)(implicit pos: Position): Assertion
- Definition Classes
- Assertions
-
macro
def
assertDoesNotCompile(code: String)(implicit pos: Position): Assertion
- Definition Classes
- Assertions
-
def
assertResult(expected: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
-
def
assertResult(expected: Any, clue: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
-
def
assertThrows[T <: AnyRef](f: ⇒ Any)(implicit classTag: ClassTag[T], pos: Position): Assertion
- Definition Classes
- Assertions
-
macro
def
assertTypeError(code: String)(implicit pos: Position): Assertion
- Definition Classes
- Assertions
-
val
assertionsHelper: AssertionsHelper
- Definition Classes
- Assertions
-
macro
def
assume(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
-
macro
def
assume(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
-
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
booleanThat(matcher: ArgumentMatcher[Boolean]): Boolean
Delegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java versionDelegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version- Definition Classes
- ThatMatchers
-
def
byteThat(matcher: ArgumentMatcher[Byte]): Byte
Delegates the call to
argThat
but using the Scala "primitives", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java versionDelegates the call to
argThat
but using the Scala "primitives", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version- Definition Classes
- ThatMatchers
-
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
cancel(cause: Throwable)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
-
def
cancel(message: String, cause: Throwable)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
-
def
cancel(message: String)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
-
def
cancel()(implicit pos: Position): Nothing
- Definition Classes
- Assertions
-
def
charThat(matcher: ArgumentMatcher[Char]): Char
Delegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java versionDelegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version- Definition Classes
- ThatMatchers
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
contains(substring: String): String
Delegates to
ArgumentMatchers.contains()
, it's only here so we expose all theArgumentMatchers
on a single placeDelegates to
ArgumentMatchers.contains()
, it's only here so we expose all theArgumentMatchers
on a single place- Definition Classes
- StringThatMatchers
-
def
conversionCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], cnv: (B) ⇒ A): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
def
convertEquivalenceToAToBConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: <:<[A, B]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
def
convertEquivalenceToAToBConversionConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: (A) ⇒ B): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
def
convertEquivalenceToBToAConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: <:<[B, A]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
def
convertEquivalenceToBToAConversionConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: (B) ⇒ A): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
def
convertToCheckingEqualizer[T](left: T): CheckingEqualizer[T]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
implicit
def
convertToEqualizer[T](left: T): Equalizer[T]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
def
defaultEquality[A]: Equality[A]
- Definition Classes
- TripleEqualsSupport
-
def
doAnswer(answer: Answer[_]): 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
-
def
doubleThat(matcher: ArgumentMatcher[Double]): Double
Delegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java versionDelegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version- Definition Classes
- ThatMatchers
-
def
endsWith(suffix: String): String
Delegates to
ArgumentMatchers.endsWith()
, it's only here so we expose all theArgumentMatchers
on a single placeDelegates to
ArgumentMatchers.endsWith()
, it's only here so we expose all theArgumentMatchers
on a single place- Definition Classes
- StringThatMatchers
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
eqTo[T](value: T): T
Delegates to
ArgumentMatchers.eq()
, it renames the method toeqTo
to avoid clashes with the Scalaeq
method used for reference equalityDelegates to
ArgumentMatchers.eq()
, it renames the method toeqTo
to avoid clashes with the Scalaeq
method used for reference equality- Definition Classes
- EqMatchers
-
def
eqToVal[T](value: Any)(implicit valueClassMatchers: ValueClassMatchers[T]): T
Wraps the standard 'ArgumentMatchers.eq()' matcher on the value class provided, this one requires the type to be explicit
Wraps the standard 'ArgumentMatchers.eq()' matcher on the value class provided, this one requires the type to be explicit
- Definition Classes
- EqMatchers
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
execute(testName: String, configMap: ConfigMap, color: Boolean, durations: Boolean, shortstacks: Boolean, fullstacks: Boolean, stats: Boolean): Unit
- Definition Classes
- Suite
-
def
expectedTestCount(filter: Filter): Int
- Definition Classes
- Suite
-
def
fail(cause: Throwable)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
-
def
fail(message: String, cause: Throwable)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
-
def
fail(message: String)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
-
def
fail()(implicit pos: Position): Nothing
- Definition Classes
- Assertions
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
floatThat(matcher: ArgumentMatcher[Float]): Float
Delegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java versionDelegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version- Definition Classes
- ThatMatchers
-
def
function0[T](value: T): () ⇒ T
- Definition Classes
- FunctionMatchers
-
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
- MockitoSugar
-
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
- MockitoSugar
-
def
intThat(matcher: ArgumentMatcher[Int]): Int
Delegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java versionDelegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version- Definition Classes
- ThatMatchers
-
def
intercept[T <: AnyRef](f: ⇒ Any)(implicit classTag: ClassTag[T], pos: Position): T
- Definition Classes
- Assertions
-
def
isA[T](implicit classTag: ClassTag[T]): T
Delegates to
ArgumentMatchers.isA(type: Class[T])
It provides a nicer API as you can, for instance, do isA[String] instead of isA(classOf[String])Delegates to
ArgumentMatchers.isA(type: Class[T])
It provides a nicer API as you can, for instance, do isA[String] instead of isA(classOf[String])- Definition Classes
- EqMatchers
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
longThat(matcher: ArgumentMatcher[Long]): Long
Delegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary conversion that would be necessary used the Java versionDelegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary conversion that would be necessary used the Java version- Definition Classes
- ThatMatchers
-
def
lowPriorityConversionCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], cnv: (A) ⇒ B): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
def
lowPriorityTypeCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], ev: <:<[A, B]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
def
matches(regex: String): String
Delegates to
ArgumentMatchers.matches()
, it's only here so we expose all theArgumentMatchers
on a single placeDelegates to
ArgumentMatchers.matches()
, it's only here so we expose all theArgumentMatchers
on a single place- Definition Classes
- StringThatMatchers
-
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
nestedSuites: IndexedSeq[Suite]
- Definition Classes
- Suite
-
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
pending: Assertion with PendingStatement
- Definition Classes
- Assertions
-
def
pendingUntilFixed(f: ⇒ Unit)(implicit pos: Position): Assertion with PendingStatement
- Definition Classes
- Assertions
-
def
refEq[T](value: T, excludeFields: String*): T
Delegates to
ArgumentMatchers.refEq()
, it's only here so we expose all theArgumentMatchers
on a single placeDelegates to
ArgumentMatchers.refEq()
, it's only here so we expose all theArgumentMatchers
on a single place- Definition Classes
- EqMatchers
-
def
rerunner: Option[String]
- Definition Classes
- Suite
-
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
run(testName: Option[String], args: Args): Status
- Definition Classes
- Suite
-
def
runNestedSuites(args: Args): Status
- Attributes
- protected
- Definition Classes
- Suite
-
def
runTest(testName: String, args: Args): Status
- Attributes
- protected
- Definition Classes
- TestSuite → Suite
-
def
runTests(testName: Option[String], args: Args): Status
- Attributes
- protected
- Definition Classes
- Suite
-
def
same[T](value: T): T
Delegates to
ArgumentMatchers.same()
, it's only here so we expose all theArgumentMatchers
on a single placeDelegates to
ArgumentMatchers.same()
, it's only here so we expose all theArgumentMatchers
on a single place- Definition Classes
- EqMatchers
-
def
shortThat(matcher: ArgumentMatcher[Short]): Short
Delegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java versionDelegates the call to
argThat
but using the Scala "primitive", this provides avoids an unnecessary implicit conversion that would be necessary if we used the Java version- Definition Classes
- ThatMatchers
-
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
- MockitoSugar
-
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
- MockitoSugar
-
def
startsWith(prefix: String): String
Delegates to
ArgumentMatchers.startsWith()
, it's only here so we expose all theArgumentMatchers
on a single placeDelegates to
ArgumentMatchers.startsWith()
, it's only here so we expose all theArgumentMatchers
on a single place- Definition Classes
- StringThatMatchers
-
val
styleName: String
- Definition Classes
- Suite
-
final
val
succeed: Assertion
- Definition Classes
- Assertions
-
def
suiteId: String
- Definition Classes
- Suite
-
def
suiteName: String
- Definition Classes
- Suite
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tags: Map[String, Set[String]]
- Definition Classes
- Suite
-
def
testDataFor(testName: String, theConfigMap: ConfigMap): TestData
- Definition Classes
- Suite
-
def
testNames: Set[String]
- Definition Classes
- Suite
-
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
typeCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], ev: <:<[B, A]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
implicit
def
unconstrainedEquality[A, B](implicit equalityOfA: Equality[A]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
-
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
- MockitoSugar
-
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
- MockitoSugar
-
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
- MockitoSugar
-
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
- MockitoSugar
-
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
- MockitoSugar
-
def
withClue[T](clue: Any)(fun: ⇒ T): T
- Definition Classes
- Assertions
-
def
withFixture(test: NoArgTest): Outcome
- Definition Classes
- MockitoFixture → TestSuite
-
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
Deprecated Value Members
-
final
def
execute: Unit
- Definition Classes
- Suite
- Annotations
- @deprecated
- Deprecated
The parameterless execute method has been deprecated and will be removed in a future version of ScalaTest. Please invoke execute with empty parens instead: execute().
-
def
isNotNull[T]: T
Delegates to
ArgumentMatchers.isNotNull()
, it's only here so we expose all theArgumentMatchers
on a single place, but marked as @deprecated as you shouldn't be testing for nulls on ScalaDelegates to
ArgumentMatchers.isNotNull()
, it's only here so we expose all theArgumentMatchers
on a single place, but marked as @deprecated as you shouldn't be testing for nulls on Scala- Definition Classes
- NullMatchers
- Annotations
- @deprecated
- Deprecated
-
def
isNull[T]: T
Delegates to
ArgumentMatchers.isNull()
, it's only here so we expose all theArgumentMatchers
on a single place, but marked as @deprecated as you shouldn't be testing for nulls on ScalaDelegates to
ArgumentMatchers.isNull()
, it's only here so we expose all theArgumentMatchers
on a single place, but marked as @deprecated as you shouldn't be testing for nulls on Scala- Definition Classes
- NullMatchers
- Annotations
- @deprecated
- Deprecated
-
def
trap[T](f: ⇒ T): Throwable
- Definition Classes
- Assertions
- Annotations
- @deprecated
- Deprecated
The trap method is no longer needed for demos in the REPL, which now abreviates stack traces, and will be removed in a future version of ScalaTest