Testing #livedata on #android
▻https://hackernoon.com/testing-livedata-on-android-d717c241efb1?source=rss----3a8144eabfe3---4
Testing LiveData represents an interesting challenge due to the peculiarities of its technology and the way it eases development for your Android app.I’ve recently started to build an Android app to keep motivated on my journey to learn Kotlin. My most recent experience has been with Architecture Components and this brief blog post, in particular, will focus on unit testing your DAO when using LiveData.What is LiveData?LiveData is a lifecycle-aware, observable data holder that will help you react to changes in you data source. In my case, I’m using it in combination with Room to make sure my app reacts to the new data becoming available in my database.Our simple DAOFor this blog post let’s just pretend we have a very simple DAO that looks like the (...)