TagArchitecture Components

Android Architecture Components: Testing your Room DAO classes


In this previous post, we look at testing our ViewModel LiveData from the classes used in the Architecture components library. You can check this post out here if you haven’t yet: Today we’re here to talk about how we can write tests for our DAO classes when we’re using Room for our Database layer in our application. The great thing is is that this is a straight forward concept and is probably...

Android Architecture Components: Testing your ViewModel LiveData


Last week I pushed a fork of the Buffer Android Boilerplate to a public repository — the difference with this fork is that it uses the new architecture components (ViewModels in the presentation layer and Room in the cache layer). If you haven’t seen it yet, you can do so here 👉 But we’re not here to talk about the boilerplate itself! Because you’re going to be writing tests for your ViewModels...