June 2014
Intermediate to advanced
284 pages
6h 9m
English
In this chapter, we will cover the following recipes:
delegatesTo()Before going into the details regarding how to create a spy, let's first consider what a spy really is. It's an object that may have predefined answers to its method executions, whereas by default it calls the real implementation. It also records the method calls for further verification. So how does it differ from any other test double? Well, apart from the fact that you can stub its methods, you can also verify its behavior. ...
Read now
Unlock full access