Updated on 2026-08-14
This commit is contained in:
parent
d50489aec5
commit
d835307af9
1 changed files with 4 additions and 7 deletions
|
|
@ -6,18 +6,15 @@ import com.tangem.domain.common.extensions.fromNetworkId
|
|||
import com.tangem.domain.common.extensions.toNetworkId
|
||||
import org.junit.Test
|
||||
|
||||
class BlockchainNetworkIdTests {
|
||||
class BlockchainTests {
|
||||
@Test
|
||||
fun checkAppropriateImplementationForNetworkIds() {
|
||||
fun allNetworkIdsAreImplemented() {
|
||||
val unimplementedIds = Blockchain.values()
|
||||
.toMutableList()
|
||||
.apply { remove(Blockchain.Unknown) }
|
||||
.map { it to Blockchain.fromNetworkId(it.toNetworkId()) }
|
||||
.filter { it.second == null }
|
||||
.mapNotNull { if(it.second == null) it.first else null }
|
||||
|
||||
if (unimplementedIds.isEmpty()) return
|
||||
|
||||
val message = unimplementedIds.joinToString("\n") { it.first.fullName }
|
||||
Truth.assert_().withMessage(message).fail()
|
||||
Truth.assertThat(unimplementedIds).isEmpty()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue