This file contains hidden or 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
| sealed interface DeepLink { | |
| data class TransferMoney(val destinationAccountId: String) : DeepLink | |
| data class AccountOverview(val accountId: String) : DeepLink | |
| data object Blogs : DeepLink | |
| } |
This file contains hidden or 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
| @RunWith(ExhaustiveTestRunner::class) | |
| @Exhaustive(DeepLink::class) | |
| @ExhaustiveCase(DeepLink.TransferMoney::class, DeepLinkTest.TransferMoneyTest::class) | |
| @ExhaustiveCase(DeepLink.AccountOverview::class, DeepLinkTest.AccountOverviewTest::class) | |
| class DeepLinkTest { | |
| class TransferMoneyTest { | |
| @Test | |
| fun testTransferMoney() { | |
| // ... |
This file contains hidden or 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
| annotation class Exhaustive( | |
| val sealedType: KClass<*>, | |
| ) | |
| @Repeatable | |
| annotation class ExhaustiveCase( | |
| val sealedType: KClass<*>, | |
| val test: KClass<*>, | |
| ) |