O'Reilly logo

Learning Android Application Testing by Paul Blundell, Diego Torres Milano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extensive use of mock objects

In the previous chapters, we described and used the mock classes that are present in the Android SDK. While these classes can cover a great number of cases, there are other Android classes and your own domain classes to consider. You might have the need for other mock objects to furnish your test cases.

Several libraries provide the infrastructure to satisfy our mocking needs, but we are now concentrating on Mockito, which is perhaps the most widely used library in Android.

Note

This is not a Mockito tutorial. We will just be analyzing its use in Android, so if you are not familiar with it, I would recommend that you take a look at the documentation available on its website at https://code.google.com/p/mockito/.

Mockito ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required