aspose file tools
The moose likes Testing and the fly likes test spy and mock Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "test spy and mock" Watch "test spy and mock" New topic
Author

test spy and mock

David Spades
Ranch Hand

Joined: Feb 01, 2014
Posts: 279
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
Bartender

Joined: Mar 28, 2008
Posts: 1639
    
  85

That's quite a broad question. What do you mean by "container"? And what kind of assertion are you talking about?


Tim Driven Development
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: test spy and mock