Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

test spy and mock

 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I read that we should not use mocks if a failed assertion cannot be reported effectively back to the Test Runner. This may be the case if the tested object is running inside a container that catches and eats all exceptions. In these cases we may be better off using a Test Spy.

Could anyone please explain about this? I mean can anybody show an example of an object that's running inside a container where mocks would fail and spy won't?
thanks
 
Tim Cooke
Sheriff
Pie
Posts: 3073
127
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's quite a broad question. What do you mean by "container"? And what kind of assertion are you talking about?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic