IOMockitoMatchers

kirill5k.common.test.cats.IOMockitoMatchers
trait IOMockitoMatchers extends MockitoMatchers

Attributes

Graph
Supertypes
trait MockitoMatchers
trait MockitoSugar
class Object
trait Matchable
class Any
Known subtypes
trait IOWordSpec

Members list

Value members

Inherited methods

def any[A]: A

Attributes

Inherited from:
MockitoMatchers
def doAnswer[A](answer: Answer[A]): Stubber

Attributes

Inherited from:
MockitoMatchers
def doThrow[A](error: Throwable): Stubber

Attributes

Inherited from:
MockitoMatchers
def eqTo[A](value: A): A

Attributes

Inherited from:
MockitoMatchers
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
def verify[A](mock: A): A

Attributes

Inherited from:
MockitoMatchers
def verify[A](mock: A, mode: VerificationMode): A

Attributes

Inherited from:
MockitoMatchers
def verifyNoInteractions(mocks: AnyRef*): Unit

Attributes

Inherited from:
MockitoMatchers
def verifyNoMoreInteractions(mocks: AnyRef*): Unit

Attributes

Inherited from:
MockitoMatchers
def when[A](mock: A): OngoingStubbing[A]

Attributes

Inherited from:
MockitoMatchers

Extensions

Extensions

extension [A](stub: OngoingStubbing[IO[A]])
def thenRaiseError(error: Throwable): OngoingStubbing[IO[A]]
def thenReturnIO(value: A): OngoingStubbing[IO[A]]
extension (stub: OngoingStubbing[IO[Unit]])
def thenReturnUnit: OngoingStubbing[IO[Unit]]
extension [A](stub: OngoingStubbing[Stream[IO, A]])
def thenFailStream(error: Throwable): OngoingStubbing[Stream[IO, A]]
def thenReturnEmptyStream: OngoingStubbing[Stream[IO, A]]
def thenStream(items: A*): OngoingStubbing[Stream[IO, A]]
def thenStream(items: List[A]): OngoingStubbing[Stream[IO, A]]
extension [A](stub: OngoingStubbing[IO[Option[A]]])
def thenReturnNone: OngoingStubbing[IO[Option[A]]]
def thenReturnSome(value: A): OngoingStubbing[IO[Option[A]]]