Android-CleanArchitecture-Kotlin
Android-CleanArchitecture-Kotlin copied to clipboard
Navigator tests pass even if the destination Activity changes
Regarding NavigatorTest
:
@Test fun `should forward user to movies screen`() {
whenever(authenticator.userLoggedIn()).thenReturn(true)
navigator.showMain(activityContext())
verify(authenticator).userLoggedIn()
RouteActivity::class shouldNavigateTo MoviesActivity::class
}
if you switch MoviesActivity
with LoginActivity
the test still passes
Remove the = in this line and fix the hidden errors.
This is a workaround that works but I did it half a year ago, and I would appreciate a better solution.