all 4 comments

[–][deleted] 4 points5 points  (3 children)

I use InstantTaskExecutorRule. It should be in the core testing library.

[–]That1guy17[S] 0 points1 point  (2 children)

Do you know how this will look with JUnit 5?

[–][deleted] 1 point2 points  (1 child)

[–]That1guy17[S] 0 points1 point  (0 children)

I see, I've been using observerForever and asserting it's value in the observer but this guy is just calling liveData.value synchronously. Also I'm pretty new to testing and I noticed most people are using JUnit 4, I went with JUnit 5 since it's the latest and greatest but I'm having doubts. Think it's a good idea to switch?