May 2022
Intermediate to advanced
688 pages
20h 12m
English
In this chapter, you used assertEquals() to make assertions on your QuizViewModel. Checking for equality is not the only assertion you can make in JUnit tests. You can also check whether something is null (using assertNull()) or is true or false (using assertTrue() or assertFalse(), respectively), among others. Try using assertTrue() or assertFalse() to verify that QuizViewModel.currentQuestionAnswer behaves the way you expect it to.
Read now
Unlock full access