Omit current navigation argument classes from code coverage (#434)

This commit is contained in:
Brian Yencho 2023-12-27 09:46:36 -06:00 committed by Álison Fernandes
parent 48169bafb9
commit 72446513b5
2 changed files with 4 additions and 0 deletions

View file

@ -7,6 +7,7 @@ import androidx.navigation.NavOptions
import androidx.navigation.NavType import androidx.navigation.NavType
import androidx.navigation.compose.composable import androidx.navigation.compose.composable
import androidx.navigation.navArgument import androidx.navigation.navArgument
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
import com.x8bit.bitwarden.ui.platform.theme.TransitionProviders import com.x8bit.bitwarden.ui.platform.theme.TransitionProviders
private const val EMAIL_ADDRESS: String = "email_address" private const val EMAIL_ADDRESS: String = "email_address"
@ -16,6 +17,7 @@ private const val LOGIN_ROUTE: String = "login/{$EMAIL_ADDRESS}?$CAPTCHA_TOKEN={
/** /**
* Class to retrieve login arguments from the [SavedStateHandle]. * Class to retrieve login arguments from the [SavedStateHandle].
*/ */
@OmitFromCoverage
class LoginArgs(val emailAddress: String, val captchaToken: String?) { class LoginArgs(val emailAddress: String, val captchaToken: String?) {
constructor(savedStateHandle: SavedStateHandle) : this( constructor(savedStateHandle: SavedStateHandle) : this(
checkNotNull(savedStateHandle[EMAIL_ADDRESS]) as String, checkNotNull(savedStateHandle[EMAIL_ADDRESS]) as String,

View file

@ -7,6 +7,7 @@ import androidx.navigation.NavOptions
import androidx.navigation.NavType import androidx.navigation.NavType
import androidx.navigation.compose.composable import androidx.navigation.compose.composable
import androidx.navigation.navArgument import androidx.navigation.navArgument
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
import com.x8bit.bitwarden.ui.platform.theme.TransitionProviders import com.x8bit.bitwarden.ui.platform.theme.TransitionProviders
private const val VAULT_ITEM_PREFIX = "vault_item" private const val VAULT_ITEM_PREFIX = "vault_item"
@ -16,6 +17,7 @@ private const val VAULT_ITEM_ROUTE = "$VAULT_ITEM_PREFIX/{$VAULT_ITEM_ID}"
/** /**
* Class to retrieve vault item arguments from the [SavedStateHandle]. * Class to retrieve vault item arguments from the [SavedStateHandle].
*/ */
@OmitFromCoverage
class VaultItemArgs(val vaultItemId: String) { class VaultItemArgs(val vaultItemId: String) {
constructor(savedStateHandle: SavedStateHandle) : this( constructor(savedStateHandle: SavedStateHandle) : this(
checkNotNull(savedStateHandle[VAULT_ITEM_ID]) as String, checkNotNull(savedStateHandle[VAULT_ITEM_ID]) as String,