O'Reilly logo

Android Application Testing Guide by 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 previous chapters we described and used the mock classes that are present in the Android SDK. While these classes could cover a great number of cases, that is not all and you may 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 EasyMock which is perhaps the most widely used in Android.

Note

This is not an EasyMock tutorial. We will just be analyzing its use in Android, so if you are not familiar with it I would recommend you take a look at the documentation available at its website: http://easymock.org/.

EasyMock, an Open Source software project available under the Apache 2.0 license, provides ...

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