Android-CleanArchitecture-Kotlin icon indicating copy to clipboard operation
Android-CleanArchitecture-Kotlin copied to clipboard

Navigator tests pass even if the destination Activity changes

Open cesarferreira opened this issue 6 years ago • 2 comments

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

cesarferreira avatar Jun 23 '18 11:06 cesarferreira

Remove the = in this line and fix the hidden errors.

albodelu avatar Jun 24 '18 11:06 albodelu

This is a workaround that works but I did it half a year ago, and I would appreciate a better solution.

albodelu avatar Sep 25 '18 20:09 albodelu