Abstract
One of the major goals whether it’s on the Android platform or not is to isolate the code that we’re testing. When we write our tests, we want to test a specific class’s method without any of the associated interactions with other classes in the app or any external elements, such as a web service. We should be testing a single method, not its dependencies and this method should be the only code covered by the test with everything else mocked.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Electronic Supplementary Material
Below is the link to the electronic supplementary material.
Rights and permissions
Copyright information
© 2015 Godfrey Nolan
About this chapter
Cite this chapter
Nolan, G. (2015). Mocking. In: Agile Android. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-9701-8_4
Download citation
DOI: https://doi.org/10.1007/978-1-4842-9701-8_4
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-9700-1
Online ISBN: 978-1-4842-9701-8
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)