MockitoMatchers

kirill5k.common.test.MockitoMatchers
trait MockitoMatchers extends MockitoSugar

Attributes

Graph
Supertypes
trait MockitoSugar
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def any[A]: A
def anyBoolean: Boolean
def anyList[A]: List[A]
def anyOpt[A]: Option[A]
def anyString: String
def doAnswer[A](answer: Answer[A]): Stubber
def doThrow[A](error: Throwable): Stubber
def eqTo[A](value: A): A
def never: VerificationMode
def times(numberOfInvocations: Int): VerificationMode
def verify[A](mock: A, mode: VerificationMode): A
def verify[A](mock: A): A
def verifyNoInteractions(mocks: AnyRef*): Unit
def verifyNoMoreInteractions(mocks: AnyRef*): Unit
def when[A](mock: A): OngoingStubbing[A]

Inherited methods

def mock[T <: AnyRef](name: String)(implicit classTag: ClassTag[T]): T

Invokes the mock(classToMock: Class[T], name: String) method on the Mockito companion object (i.e., the static mock(java.lang.Class classToMock, java.lang.String name) method in Java class org.mockito.Mockito).

Invokes the mock(classToMock: Class[T], name: String) method on the Mockito companion object (i.e., the static mock(java.lang.Class classToMock, java.lang.String name) method in Java class org.mockito.Mockito).

Using the Mockito API directly, you create a mock with:

val mockCollaborator = mock(classOf[Collaborator], name)

Using this method, you can shorten that to:

val mockCollaborator = mock[Collaborator](name)

Attributes

Inherited from:
MockitoSugar
def mock[T <: AnyRef](mockSettings: MockSettings)(implicit classTag: ClassTag[T]): T

Invokes the mock(classToMock: Class[T], mockSettings: MockSettings) method on the Mockito companion object (i.e., the static mock(java.lang.Class classToMock, org.mockito.MockSettings mockSettings) method in Java class org.mockito.Mockito).

Invokes the mock(classToMock: Class[T], mockSettings: MockSettings) method on the Mockito companion object (i.e., the static mock(java.lang.Class classToMock, org.mockito.MockSettings mockSettings) method in Java class org.mockito.Mockito).

Using the Mockito API directly, you create a mock with:

val mockCollaborator = mock(classOf[Collaborator], mockSettings)

Using this method, you can shorten that to:

val mockCollaborator = mock[Collaborator](mockSettings)

Attributes

Inherited from:
MockitoSugar
def mock[T <: AnyRef](defaultAnswer: Answer[_])(implicit classTag: ClassTag[T]): T

Invokes the mock(classToMock: Class[T], defaultAnswer: Answer[_]) method on the Mockito companion object (i.e., the static mock(java.lang.Class classToMock, org.mockito.stubbing.Answer defaultAnswer) method in Java class org.mockito.Mockito).

Invokes the mock(classToMock: Class[T], defaultAnswer: Answer[_]) method on the Mockito companion object (i.e., the static mock(java.lang.Class classToMock, org.mockito.stubbing.Answer defaultAnswer) method in Java class org.mockito.Mockito).

Using the Mockito API directly, you create a mock with:

val mockCollaborator = mock(classOf[Collaborator], defaultAnswer)

Using this method, you can shorten that to:

val mockCollaborator = mock[Collaborator](defaultAnswer)

Attributes

Inherited from:
MockitoSugar
def mock[T <: AnyRef](implicit classTag: ClassTag[T]): T

Invokes the mock(classToMock: Class[T]) method on the Mockito companion object (i.e., the static mock(java.lang.Class classToMock) method in Java class org.mockito.Mockito).

Invokes the mock(classToMock: Class[T]) method on the Mockito companion object (i.e., the static mock(java.lang.Class classToMock) method in Java class org.mockito.Mockito).

Using the Mockito API directly, you create a mock with:

val mockCollaborator = mock(classOf[Collaborator])

Using this method, you can shorten that to:

val mockCollaborator = mock[Collaborator]

Attributes

Inherited from:
MockitoSugar