Invokes the mock
method on the Mockito
companion object (i.e., the
static mock
method in Java class org.mockito.Mockitok
).
Invokes the mock
method on the Mockito
companion object (i.e., the
static mock
method in Java class org.mockito.Mockitok
).
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]
Trait that provides some basic syntax sugar for Mockito.
Using the Mockito API directly, you create a mock with:
Using this trait, you can shorten that to: