Nick
11/09/2022, 12:07 AMHistoryView
is an AndroidView so I can't mock it. How do I test this code inside the lambda?
@VisibleForTesting
fun attachHistory() {
historyView = HistoryView(get(),
navToPastVisits = ::attachVisitHistory,
handlePastVisitsBackPressed = {
visitHistoryRouter?.let { <------ I want to test the logic here
if(!it.handleBackPress()) {
detachVisitHistory()
}
true
} ?: false
}
)
}