Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. describe("ServiceApiImpl") {
  2. it("get name") {
  3. val serviceApi = new ServiceApiImpl
  4. val serviceApiSpy = spy(serviceApi)
  5.  
  6. when(serviceApiSpy.getUser(101))
  7. .thenReturn(EitherT.rightT[Future, String](ExternalUser(101, "John")))
  8.  
  9. assertResult(EitherT.rightT[Future, String](User(John))) {
  10. serviceApiSpy.getName(101)
  11. }
  12. }
  13.  
  14. }
  15.  
  16. Expected EitherT(Future(Success(Right(User("John"))))), but got EitherT(Future(Success(Right(User("John")))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement