package com.github.nullptroma.wallenc.ui.screens.main.screens.storage

import com.github.nullptroma.wallenc.ui.screens.main.screens.storage.secrets.TextSecretDetailsRoute
import com.github.nullptroma.wallenc.ui.screens.main.screens.storage.secrets.TextSecretEditRoute
import com.github.nullptroma.wallenc.ui.screens.main.screens.storage.secrets.TextSecretsRoute
import com.github.nullptroma.wallenc.ui.screens.main.screens.storage.twofa.TwoFaTokensRoute
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test

class StorageNavigationRoutesSmokeTest {

    @Test
    fun storageHomeRouteCarriesVaultAndStorageIds() {
        val route = StorageHomeRoute(
            vaultUuid = "vault-1",
            storageUuid = "storage-1",
        )
        assertEquals("vault-1", route.vaultUuid)
        assertEquals("storage-1", route.storageUuid)
    }

    @Test
    fun textSecretsRoutesCarryRequiredArguments() {
        val listRoute = TextSecretsRoute(storageUuid = "storage-1")
        val detailsRoute = TextSecretDetailsRoute(storageUuid = "storage-1", secretId = "secret-1")
        val editRoute = TextSecretEditRoute(storageUuid = "storage-1", secretId = null)
        val twoFaRoute = TwoFaTokensRoute(storageUuid = "storage-1")

        assertEquals("storage-1", listRoute.storageUuid)
        assertEquals("secret-1", detailsRoute.secretId)
        assertNull(editRoute.secretId)
        assertEquals("storage-1", twoFaRoute.storageUuid)
    }
}
