Skip to content

Commit

Permalink
Merge pull request #88 from jlmd/expose-test-up-navigation-handler
Browse files Browse the repository at this point in the history
Move TestUpNavigationHandler to testing-unit-common
  • Loading branch information
zsoltk authored Aug 18, 2022
2 parents 11172e3 + c93826e commit c1ae14a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [#65](https://github.com/bumble-tech/appyx/pull/65) – Added: `InteropBuilderStub` and `InteropSimpleBuilderStub` testing util classes
- [#47](https://github.com/bumble-tech/appyx/issues/47) – Updated: The 'customisations' module is now pure Java/Kotlin.
- [#85](https://github.com/bumble-tech/appyx/issues/85) – Updated: Improved `InteropView` error messaging when `Activity` does not implement `IntegrationPointAppyxProvider`
- [#88](https://github.com/bumble-tech/appyx/issues/88) – Updated: Moved `TestUpNavigationHandler` to `testing-unit-common`


## 1.0-alpha03
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import com.bumble.appyx.core.plugin.StubUpNavigationHandler
import com.bumble.appyx.core.plugin.UpNavigationHandler
import com.bumble.appyx.routingsource.backstack.BackStack
import com.bumble.appyx.routingsource.backstack.operation.push
import com.bumble.appyx.testing.unit.common.util.TestIntegrationPoint
import com.bumble.appyx.testing.junit4.util.MainDispatcherRule
import com.bumble.appyx.testing.unit.common.util.TestIntegrationPoint
import com.bumble.appyx.testing.unit.common.util.TestUpNavigationHandler
import org.junit.Assert.assertEquals
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.bumble.appyx.testing.unit.common.util

import com.bumble.appyx.core.routing.upnavigation.UpNavigationHandler
import kotlin.test.assertFalse
import kotlin.test.assertTrue

class TestUpNavigationHandler : UpNavigationHandler {
var invoked: Boolean = false

override fun handleUpNavigation() {
invoked = true
}

fun assertInvoked() {
assertTrue(invoked, "Has not navigated up")
}

fun assertNotInvoked() {
assertFalse(invoked, "Has navigated up")
}
}

0 comments on commit c1ae14a

Please sign in to comment.