Registry / testing / mockito-scala-2-12

mockito-scala-2-12

JSON →
library2.2.1javamavenunverified

Scala integration for Mockito mocking framework, providing idiomatic Scala syntax for mock creation and verification.

<dependency> <groupId>org.mockito</groupId> <artifactId>mockito-scala_2.12</artifactId> <version>2.2.1</version> </dependency>
INSTALL
IMPORT
SIG · MOCKITO-SCALA-2-12
M
mockito-scala-2-12
testingjavav2.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MockitoSugar
org.mockito.scalatest.MockitoSugar

Uses MockitoSugar trait to create and stub a mock in ScalaTest.

import org.mockito.scalatest.MockitoSugar class Example extends MockitoSugar { def test(): Unit = { val mockList = mock[List[String]] when(mockList.get(0)).thenReturn("hello") println(mockList.get(0)) } }
Debug
Known issues
breakingVersion 2.2.1 is for Scala 2.12; use mockito-scala_2.13 for Scala 2.13.
fix
Use the artifactId mockito-scala_2.13 for Scala 2.13 projects.
affects: 2.x
Upgrade
Version history
2.2.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mockito-scala-2-12 — mvn dependency:get mockito-scala-2-12 · libregistry