Advertisement

Mocking

  • Godfrey Nolan
Chapter
  • 1.5k Downloads

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.

Keywords

Shared Orientation SQLite Database Shared Preferences File Create, Read, Update, Delete (CRUD) Emulation Overhead 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Supplementary material

978-1-4842-9701-8_4_MOESM1_ESM.zip (939 kb)
Chapter4 (zip 939 kb)

Copyright information

© Godfrey Nolan 2015

Authors and Affiliations

  • Godfrey Nolan
    • 1
  1. 1.MIUS

Personalised recommendations