Felix K

Sep 24, 2019

3 min read

Mocking Intents: The Parcelable Injection Pattern

When testing Android apps, it is common to trigger specific actions with Mock-Intents. Beside of primitive data types, an Intent can carry so-called “Parcelable objects”. Parcelables implement an efficient low-level interface for serializing and deserializing the object.
In many cases, Parcelables are system-specific objects that are provided by the Android SDK.

Mocking Parcelables