You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to Mockito so this may be a simple issue but I couldn't find a solution
val users = List(User(name = "A"))
val userRepoMock = mock[UserRepo]
"GET /users" should {
"return the users" in {
when(userRepoMock.get()).thenReturn(Future.successful(Good(users)))
When I run the test, it fails as follows
value thenReturn is not a member of Nothing
[error] L55:
when(userRepoMock.get()).thenReturn(Future.successful(Good(users)))
[error] L55:
Note that some configuration are impossible to mock via Mockito
(same as any question on stackoverflow.com)
I am new to Mockito so this may be a simple issue but I couldn't find a solution
When I run the test, it fails as follows
Here is the definition of UserRepo
versions:
Mockito ( mockito-core: 3.3.3, mockito-scala_2.12 )
os ( MacOS )
Could anyone can help me to fix this issue, please?
Thanks in advance
The text was updated successfully, but these errors were encountered: