Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ class HistoryTest : BaseTest() {
@LocalStore(
localStoreDataIds = [KEY_VALUE_NO_HISTORY]
)
fun givenNoHistoryWhenOnHistoryScreenThenSeesHistory() {
fun givenNoHistoryWhenOnHistoryScreenThenSeesNoRecords() {
with(historyScreen) {
seeNoRecordsLabel()
retry(repeat = 20) {
seeNoRecordsLabel()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.mitteloupe.whoami.navigation.mapper

import com.mitteloupe.whoami.architecture.presentation.navigation.PresentationNavigationEvent
import com.mitteloupe.whoami.architecture.presentation.navigation.PresentationNavigationEvent.Back
import com.mitteloupe.whoami.architecture.ui.navigation.exception.UnhandledDestinationException
import com.mitteloupe.whoami.architecture.ui.navigation.exception.UnhandledNavigationException
import com.mitteloupe.whoami.architecture.ui.navigation.mapper.NavigationEventDestinationMapper
import com.mitteloupe.whoami.architecture.ui.navigation.model.UiDestination

Expand All @@ -13,7 +13,7 @@ class HistoryNavigationEventDestinationMapper :
override fun mapTypedEvent(navigationEvent: PresentationNavigationEvent): UiDestination =
when (navigationEvent) {
is Back -> backUiDestination()
else -> throw UnhandledDestinationException(navigationEvent)
else -> throw UnhandledNavigationException(navigationEvent)
}

private fun backUiDestination() = UiDestination { navController ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.navigation.NavController
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import com.mitteloupe.whoami.analytics.Analytics
import com.mitteloupe.whoami.architecture.presentation.navigation.PresentationNavigationEvent
import com.mitteloupe.whoami.architecture.ui.navigation.exception.UnhandledDestinationException
import com.mitteloupe.whoami.architecture.ui.navigation.exception.UnhandledNavigationException
import com.mitteloupe.whoami.home.presentation.navigation.HomePresentationNavigationEvent.OnSavedDetails
import com.mitteloupe.whoami.home.presentation.navigation.HomePresentationNavigationEvent.OnViewHistory
import com.mitteloupe.whoami.home.presentation.navigation.HomePresentationNavigationEvent.OnViewOpenSourceNotices
Expand Down Expand Up @@ -115,12 +115,12 @@ class HomeNavigationEventDestinationMapperTest {
val actualException = requireNotNull(caughtException)
assertThat(
actualException,
isA(UnhandledDestinationException::class.java)
isA(UnhandledNavigationException::class.java)
)
assertThat(
actualException.message,
matchesPattern(
"^Navigation to PresentationNavigationEvent\\\$MockitoMock\\\$\\w+ " +
"^Navigation event PresentationNavigationEvent\\\$MockitoMock\\\$\\w+ " +
"was not handled.$"
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.mitteloupe.whoami.architecture.ui.navigation.exception

import com.mitteloupe.whoami.architecture.presentation.navigation.PresentationNavigationEvent

class UnhandledDestinationException(destination: PresentationNavigationEvent) :
class UnhandledNavigationException(event: PresentationNavigationEvent) :
IllegalArgumentException(
"Navigation to ${destination::class.simpleName} was not handled."
"Navigation event ${event::class.simpleName} was not handled."
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mitteloupe.whoami.architecture.ui.navigation.mapper

import com.mitteloupe.whoami.architecture.presentation.navigation.PresentationNavigationEvent
import com.mitteloupe.whoami.architecture.ui.navigation.exception.UnhandledDestinationException
import com.mitteloupe.whoami.architecture.ui.navigation.exception.UnhandledNavigationException
import com.mitteloupe.whoami.architecture.ui.navigation.model.UiDestination
import kotlin.reflect.KClass

Expand All @@ -15,7 +15,7 @@ abstract class NavigationEventDestinationMapper<in EVENT : PresentationNavigatio
}

else -> {
mapGenericEvent(navigationEvent) ?: throw UnhandledDestinationException(
mapGenericEvent(navigationEvent) ?: throw UnhandledNavigationException(
navigationEvent
)
}
Expand Down