@@ -45,7 +45,7 @@ class MockitoCatsTest extends AnyWordSpec with Matchers with MockitoSugar with A
4545 whenFG(aMock.returnsFutureEither(" hello" )) thenReturn ValueClass (" mocked!" )
4646 whenFG(aMock.returnsFutureEither(" bye" )) thenFailWith Error (" boom" )
4747
48- whenReady(aMock.returnsFutureEither(" hello" ))(_.right. value shouldBe ValueClass (" mocked!" ))
48+ whenReady(aMock.returnsFutureEither(" hello" ))(_.value shouldBe ValueClass (" mocked!" ))
4949 whenReady(aMock.returnsFutureEither(" bye" ))(_.left.value shouldBe Error (" boom" ))
5050 }
5151
@@ -69,7 +69,7 @@ class MockitoCatsTest extends AnyWordSpec with Matchers with MockitoSugar with A
6969 whenF(aMock.returnsMT[ErrorOr , ValueClass ](ValueClass (" hi" ))) thenReturn ValueClass (" mocked!" )
7070 whenF(aMock.returnsMT[ErrorOr , ValueClass ](ValueClass (" bye" ))) thenFailWith Error (" error" )
7171
72- aMock.returnsMT[ErrorOr , ValueClass ](ValueClass (" hi" )).right. value shouldBe ValueClass (" mocked!" )
72+ aMock.returnsMT[ErrorOr , ValueClass ](ValueClass (" hi" )).value shouldBe ValueClass (" mocked!" )
7373 aMock.returnsMT[ErrorOr , ValueClass ](ValueClass (" bye" )).left.value shouldBe Error (" error" )
7474 }
7575
@@ -103,7 +103,7 @@ class MockitoCatsTest extends AnyWordSpec with Matchers with MockitoSugar with A
103103 whenF(aMock.returnsEitherT(" hello" )) thenReturn ValueClass (" mocked!" )
104104
105105 whenReady(aMock.returnsEitherT(" bye" ).value)(_.left.value shouldBe Error (" error" ))
106- whenReady(aMock.returnsEitherT(" hello" ).value)(_.right. value shouldBe ValueClass (" mocked!" ))
106+ whenReady(aMock.returnsEitherT(" hello" ).value)(_.value shouldBe ValueClass (" mocked!" ))
107107 }
108108
109109 " work with OptionT" in {
@@ -138,9 +138,9 @@ class MockitoCatsTest extends AnyWordSpec with Matchers with MockitoSugar with A
138138 whenFG(aMock.returnsFutureEither(" hola" )) thenAnswer ((i : InvocationOnMock ) => ValueClass (i.arg[String ](0 ) + " invocation mocked!" ))
139139 whenFG(aMock.returnsFutureOptionFrom(42 , true )) thenAnswer ((i : Int , b : Boolean ) => s " $i, $b" )
140140
141- whenReady(aMock.returnsFutureEither(" hello" ))(_.right. value shouldBe ValueClass (" mocked!" ))
142- whenReady(aMock.returnsFutureEither(" hi" ))(_.right. value shouldBe ValueClass (" hi mocked!" ))
143- whenReady(aMock.returnsFutureEither(" hola" ))(_.right. value shouldBe ValueClass (" hola invocation mocked!" ))
141+ whenReady(aMock.returnsFutureEither(" hello" ))(_.value shouldBe ValueClass (" mocked!" ))
142+ whenReady(aMock.returnsFutureEither(" hi" ))(_.value shouldBe ValueClass (" hi mocked!" ))
143+ whenReady(aMock.returnsFutureEither(" hola" ))(_.value shouldBe ValueClass (" hola invocation mocked!" ))
144144 whenReady(aMock.returnsFutureOptionFrom(42 , true ))(_.value shouldBe " 42, true" )
145145 }
146146 }
@@ -176,7 +176,7 @@ class MockitoCatsTest extends AnyWordSpec with Matchers with MockitoSugar with A
176176 doReturnFG[Future , ErrorOr , ValueClass ](ValueClass (" mocked!" )).when(aMock).returnsFutureEither(" hello" )
177177 doFailWithG[Future , ErrorOr , Error , ValueClass ](Error (" boom" )).when(aMock).returnsFutureEither(" bye" )
178178
179- whenReady(aMock.returnsFutureEither(" hello" ))(_.right. value shouldBe ValueClass (" mocked!" ))
179+ whenReady(aMock.returnsFutureEither(" hello" ))(_.value shouldBe ValueClass (" mocked!" ))
180180 whenReady(aMock.returnsFutureEither(" bye" ))(_.left.value shouldBe Error (" boom" ))
181181 }
182182
@@ -194,7 +194,7 @@ class MockitoCatsTest extends AnyWordSpec with Matchers with MockitoSugar with A
194194 doReturnF[ErrorOr , ValueClass ](ValueClass (" mocked!" )).when(aMock).returnsMT(ValueClass (" hi" ))
195195 doFailWith[ErrorOr , Error , ValueClass ](Error (" error" )).when(aMock).returnsMT(ValueClass (" bye" ))
196196
197- aMock.returnsMT[ErrorOr , ValueClass ](ValueClass (" hi" )).right. value shouldBe ValueClass (" mocked!" )
197+ aMock.returnsMT[ErrorOr , ValueClass ](ValueClass (" hi" )).value shouldBe ValueClass (" mocked!" )
198198 aMock.returnsMT[ErrorOr , ValueClass ](ValueClass (" bye" )).left.value shouldBe Error (" error" )
199199 }
200200
@@ -216,7 +216,7 @@ class MockitoCatsTest extends AnyWordSpec with Matchers with MockitoSugar with A
216216 doReturnF[F , ValueClass ](ValueClass (" mocked!" )).when(aMock).returnsEitherT(" hello" )
217217
218218 whenReady(aMock.returnsEitherT(" bye" ).value)(_.left.value shouldBe Error (" error" ))
219- whenReady(aMock.returnsEitherT(" hello" ).value)(_.right. value shouldBe ValueClass (" mocked!" ))
219+ whenReady(aMock.returnsEitherT(" hello" ).value)(_.value shouldBe ValueClass (" mocked!" ))
220220 }
221221
222222 " work with OptionT" in {
@@ -256,9 +256,9 @@ class MockitoCatsTest extends AnyWordSpec with Matchers with MockitoSugar with A
256256 .returnsFutureEither(" hola" )
257257 doAnswerFG[Future , Option , Int , Boolean , String ]((i : Int , b : Boolean ) => s " $i, $b" ).when(aMock).returnsFutureOptionFrom(42 , true )
258258
259- whenReady(aMock.returnsFutureEither(" hello" ))(_.right. value shouldBe ValueClass (" mocked!" ))
260- whenReady(aMock.returnsFutureEither(" hi" ))(_.right. value shouldBe ValueClass (" hi mocked!" ))
261- whenReady(aMock.returnsFutureEither(" hola" ))(_.right. value shouldBe ValueClass (" hola invocation mocked!" ))
259+ whenReady(aMock.returnsFutureEither(" hello" ))(_.value shouldBe ValueClass (" mocked!" ))
260+ whenReady(aMock.returnsFutureEither(" hi" ))(_.value shouldBe ValueClass (" hi mocked!" ))
261+ whenReady(aMock.returnsFutureEither(" hola" ))(_.value shouldBe ValueClass (" hola invocation mocked!" ))
262262 whenReady(aMock.returnsFutureOptionFrom(42 , true ))(_.value shouldBe " 42, true" )
263263 }
264264 }
0 commit comments