Trait

org.mockito.scalatest

ResetMocksAfterEachTestBase

Related Doc: package scalatest

Permalink

trait ResetMocksAfterEachTestBase extends MockCreator

It automatically resets each mock after a each test is run, useful when we need to pass the mocks to some framework once at the beginning of the test suite

Just mix-in after your favourite suite, i.e.

class MyTest extends PlaySpec with MockitoSugar with ResetMocksAfterEachTest
Self Type
ResetMocksAfterEachTestBase with MockCreator
Linear Supertypes
MockCreator, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ResetMocksAfterEachTestBase
  2. MockCreator
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def spy[T <: AnyRef](realObj: T, lenient: Boolean)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.WeakTypeTag[T], arg2: Prettifier): T

    Permalink
    Definition Classes
    MockCreator
  2. abstract def spyLambda[T <: AnyRef](realObj: T)(implicit arg0: ClassTag[T]): T

    Permalink
    Definition Classes
    MockCreator

Concrete 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 clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    ResetMocksAfterEachTestBase → MockCreator
  12. def mock[T <: AnyRef](mockSettings: MockSettings)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.WeakTypeTag[T], arg2: Prettifier): T

    Permalink
    Definition Classes
    ResetMocksAfterEachTestBase → MockCreator
  13. def mock[T <: AnyRef](defaultAnswer: DefaultAnswer)(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.WeakTypeTag[T], arg2: Prettifier): T

    Permalink
    Definition Classes
    ResetMocksAfterEachTestBase → MockCreator
  14. def mock[T <: AnyRef](implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.WeakTypeTag[T], defaultAnswer: DefaultAnswer, arg3: Prettifier): T

    Permalink
    Definition Classes
    ResetMocksAfterEachTestBase → MockCreator
  15. def mock[T <: AnyRef](defaultAnswer: Answer[_])(implicit arg0: ClassTag[T], arg1: scala.reflect.api.JavaUniverse.WeakTypeTag[T], arg2: Prettifier): T

    Permalink
    Definition Classes
    MockCreator
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  19. def resetAll(): Unit

    Permalink
    Attributes
    protected
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def withSettings(implicit defaultAnswer: DefaultAnswer): MockSettings

    Permalink
    Definition Classes
    MockCreator

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from MockCreator

Inherited from AnyRef

Inherited from Any

Ungrouped