This is about the challenge.
Im trying to access MainActivitiy’s quizviewmodel value, but how do I do that ?
I tried
scenario.onActivity { activity →
assertTrue(activity.quizViewModel.currentQuestionAnswer)
}
1 Like
You could remove the private
keyword from where you define quizViewModel
. Also, you have all the tests that you wrote earlier in the chapter in QuizViewModelTest.kt
.