nickbutcher / plaid

An Android app which provides design news & inspiration as well as being an example of implementing material design.
Apache License 2.0
16.26k stars 3.16k forks source link

Uses new method getOrAwaitValue to test LiveData emissions #771

Closed manuelvicnt closed 4 years ago

manuelvicnt commented 4 years ago

:loudspeaker: Type of change

:scroll: Description

Changes usages of LiveDataTestUtil for getValue for getOrAwaitValue LiveData extension function

:bulb: Motivation and Context

The recommended way to test LiveData emissions is with the getOrAwaitValue function.

https://medium.com/androiddevelopers/unit-testing-livedata-and-other-common-observability-problems-bb477262eb04

:green_heart: How did you test it?

Unit tests

:pencil: Checklist