-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v2.2' into v2.2-compose-experimental
- Loading branch information
Showing
22 changed files
with
715 additions
and
450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
decompose/src/commonTest/kotlin/com/arkivanov/decompose/router/stack/RouterPushNewTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.arkivanov.decompose.router.stack | ||
|
||
import kotlin.test.Test | ||
import kotlin.test.assertEquals | ||
|
||
@Suppress("TestFunctionName") | ||
class RouterPushNewTest { | ||
|
||
@Test | ||
fun GIVEN_configuration_not_present_WHEN_pushNew_THEN_pushed() { | ||
val navigator = TestStackNavigator(listOf(1, 2)) | ||
|
||
navigator.pushNew(3) | ||
|
||
assertEquals(listOf(1, 2, 3), navigator.configurations) | ||
} | ||
|
||
@Test | ||
fun GIVEN_configuration_present_on_top_WHEN_pushNew_THEN_not_pushed() { | ||
val navigator = TestStackNavigator(listOf(1, 2)) | ||
|
||
navigator.pushNew(2) | ||
|
||
assertEquals(listOf(1, 2), navigator.configurations) | ||
} | ||
|
||
@Test | ||
fun GIVEN_configuration_not_present_WHEN_pushNew_THEN_onComplete_success() { | ||
val navigator = TestStackNavigator(listOf(1, 2)) | ||
var result: Boolean? = null | ||
|
||
navigator.pushNew(3) { result = it } | ||
|
||
assertEquals(true, result) | ||
} | ||
|
||
@Test | ||
fun GIVEN_configuration_present_on_top_WHEN_pushNew_THEN_onComplete_not_success() { | ||
val navigator = TestStackNavigator(listOf(1, 2)) | ||
var result: Boolean? = null | ||
|
||
navigator.pushNew(2) { result = it } | ||
|
||
assertEquals(false, result) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
This page contains links to various useful projects related to Decompose and maintained by the community. | ||
|
||
### Decompose-Router | ||
|
||
A Compose-multiplatform navigation library that leverage Decompose to create an API inspired by [Conductor](https://github.com/bluelinelabs/Conductor). | ||
|
||
!!! tip | ||
|
||
Decompose-Router is a lightweight library based on Decompose, it can be especially useful if you find Decompose cumbersome or difficult to learn. | ||
|
||
Link: [github.com/xxfast/Decompose-Router](https://github.com/xxfast/Decompose-Router) | ||
|
||
Author: [@xxfast](https://github.com/xxfast) | ||
|
||
### MVIKotlin Decompose Template (IDEA Plugin) | ||
|
||
Decompose and MVIKotlin plugin template, which will help you to create new components. | ||
|
||
Link: [plugins.jetbrains.com/plugin/22852-mvikotlin-decompose-template](https://plugins.jetbrains.com/plugin/22852-mvikotlin-decompose-template) | ||
|
||
Source code: [github.com/makeevrserg/MVIKotlin-Decompose-Plugin](https://github.com/makeevrserg/MVIKotlin-Decompose-Plugin) | ||
|
||
Author: [@makeevrserg](https://github.com/makeevrserg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.