Skip to content

Commit

Permalink
Fix unit tests for NavigationResultScope updates
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-udy committed May 21, 2024
1 parent 156f6a5 commit 1f20a27
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions enro/src/test/java/dev/enro/test/CreateResultChannelTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import dev.enro.core.NavigationKey
import dev.enro.core.controller.get
import dev.enro.core.controller.usecase.CreateResultChannel
import dev.enro.core.result.NavigationResultChannel
import dev.enro.core.result.NavigationResultScope
import dev.enro.core.result.internal.ResultChannelId
import dev.enro.core.result.internal.ResultChannelImpl
import dev.enro.core.result.registerForNavigationResult
Expand Down Expand Up @@ -109,7 +110,7 @@ class CreateResultChannelTest {
.dependencyScope
.get<CreateResultChannel>()

val result: (NavigationKey, String) -> Unit = { _, _ -> }
val result: NavigationResultScope<String, NavigationKey.WithResult<String>>.(NavigationKey, String) -> Unit = { _, _ -> }
val channelOne = createResultChannel.invoke(
resultType = String::class,
onClosed = { },
Expand All @@ -133,7 +134,7 @@ class CreateResultChannelTest {
.dependencyScope
.get<CreateResultChannel>()

val result: (String) -> Unit = {}
val result: NavigationResultScope<String, NavigationKey.WithResult<String>>.(String) -> Unit = {}
val channelOne = createResultChannel.invoke(
resultType = String::class,
onClosed = { },
Expand All @@ -157,7 +158,7 @@ class CreateResultChannelTest {
.dependencyScope
.get<CreateResultChannel>()

val result: (String) -> Unit = {}
val result: NavigationResultScope<String, NavigationKey.WithResult<String>>.(String) -> Unit = {}
val channels = (0..2).map {
createResultChannel.invoke(
resultType = String::class,
Expand All @@ -175,7 +176,7 @@ class CreateResultChannelTest {
.dependencyScope
.get<CreateResultChannel>()

val result: (String) -> Unit = {}
val result: NavigationResultScope<String, NavigationKey.WithResult<String>>.(String) -> Unit = {}
val channels = (0..2).map {
createResultChannel.invoke(
resultType = String::class,
Expand Down

0 comments on commit 1f20a27

Please sign in to comment.