Updated on 2026-08-14

This commit is contained in:
Tangem 2024-08-19 20:08:13 +04:00
parent 7453e8d179
commit fd7ac00fd4
10 changed files with 268 additions and 333 deletions

View file

@ -0,0 +1,26 @@
package com.tangem.feature.wallet.presentation.wallet.domain
import com.google.common.truth.Truth
import com.tangem.blockchain.common.Blockchain
import org.junit.Test
/**
[REDACTED_AUTHOR]
*/
internal class NoteImageTest {
@Test
fun check() {
// check uniqueness
Truth.assertThat(NoteImage.entries.map { it.blockchain }).containsNoDuplicates()
Truth.assertThat(NoteImage.entries.map { it.imageResId }).containsNoDuplicates()
// check blockchain matching
Truth.assertThat(NoteImage.Bitcoin.blockchain).isEqualTo(Blockchain.Bitcoin)
Truth.assertThat(NoteImage.Ethereum.blockchain).isEqualTo(Blockchain.Ethereum)
Truth.assertThat(NoteImage.Binance.blockchain).isEqualTo(Blockchain.BSC)
Truth.assertThat(NoteImage.Dogecoin.blockchain).isEqualTo(Blockchain.Dogecoin)
Truth.assertThat(NoteImage.Cardano.blockchain).isEqualTo(Blockchain.Cardano)
Truth.assertThat(NoteImage.XRP.blockchain).isEqualTo(Blockchain.XRP)
}
}

View file

@ -0,0 +1,22 @@
package com.tangem.feature.wallet.presentation.wallet.domain
import com.google.common.truth.Truth
import org.junit.Test
/**
[REDACTED_AUTHOR]
*/
internal class Wallet2CobrandImageTest {
@Test
fun checkUniqueness() {
val excluded = listOf(Wallet2CobrandImage.Pastel, Wallet2CobrandImage.Vivid)
(Wallet2CobrandImage.entries - excluded).forEach {
Truth.assertThat(it.cards2ResId != it.cards3ResId).isTrue()
}
Truth.assertThat(Wallet2CobrandImage.entries.map { it.cards2ResId }).containsNoDuplicates()
Truth.assertThat(Wallet2CobrandImage.entries.map { it.cards3ResId }).containsNoDuplicates()
Truth.assertThat(Wallet2CobrandImage.entries.flatMap { it.batchIds }).containsNoDuplicates()
}
}