A well tested app gives developers confidence both when adding new features and when refactoring current implementations. This confidence leads to faster development, less bugs, and better design decisions. The question is, how do you set up your application to make it easily testable? Selecting a suboptimal architecture can needlessly tie your application components together making it difficult or impossible to test them separately.
Get more development news like this
In this talk you will learn how to leverage dependency injection to design easily testable objects. We will use Dagger 2, the dependency injection tool, to decouple components in an application which allows changing those dependencies in test. Whether you want real components to test against or replace them with mock objects, dependency injection gives you the flexibility you need to correctly configure your test cases.
About the content
This talk was delivered live in July 2017 at 360 AnDev. The video was recorded, produced, and transcribed by Realm, and is published here with the permission of the conference organizers.