Updated on 2026-08-14
This commit is contained in:
parent
09c52231e2
commit
3cc0a643e9
40 changed files with 77 additions and 71 deletions
|
|
@ -8,7 +8,7 @@ import com.tangem.domain.wallets.models.AppsFlyerConversionData
|
|||
import com.tangem.feature.referral.domain.SetShouldShowMobileWalletPromoUseCase
|
||||
import com.tangem.test.core.ProvideTestModels
|
||||
import arrow.core.right
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import io.mockk.clearMocks
|
||||
import io.mockk.coEvery
|
||||
import io.mockk.coVerify
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.tangem.tap.domain
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.common.test.domain.card.MockScanResponseFactory
|
||||
import com.tangem.common.test.domain.wallet.MockUserWalletFactory
|
||||
import com.tangem.core.analytics.utils.TrackingContextProxy
|
||||
|
|
|
|||
|
|
@ -335,7 +335,10 @@ class DefaultWalletAccountsFetcherTest {
|
|||
body = SaveWalletAccountsResponse(savedAccountsResponse.accounts),
|
||||
)
|
||||
eTagsStore.clear(userWalletId, ETagsStore.Key.WalletAccounts)
|
||||
userTokensSaver.push(userWalletId = userWalletId, response = savedAccountsResponse.toUserTokensResponse())
|
||||
userTokensSaver.push(
|
||||
userWalletId = userWalletId,
|
||||
response = savedAccountsResponse.toUserTokensResponse(),
|
||||
)
|
||||
tokensMigration.migrate(userWalletId)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import com.tangem.datasource.api.tangemTech.models.account.WalletAccountDTO
|
|||
import com.tangem.datasource.local.datastore.RuntimeStateStore
|
||||
import com.tangem.domain.account.models.AccountList
|
||||
import com.tangem.domain.account.models.ArchivedAccount
|
||||
import com.tangem.domain.models.account.Account
|
||||
import com.tangem.domain.models.account.Account.CryptoPortfolio
|
||||
import com.tangem.domain.models.account.AccountId
|
||||
import com.tangem.domain.models.account.AccountName
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.tangem.data.account.repository
|
|||
|
||||
import app.cash.turbine.test
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.domain.account.models.AccountExpandedState
|
||||
import com.tangem.domain.models.account.AccountId
|
||||
import com.tangem.domain.models.account.DerivationIndex
|
||||
|
|
@ -21,7 +21,7 @@ class DefaultAccountsExpandedRepositoryTest {
|
|||
@Test
|
||||
fun `expandedAccounts emits updated state when store changes`() = runTest {
|
||||
val dataStore = MockStateDataStore<Map<String, Set<AccountsExpandedDTO>>>(
|
||||
default = emptyMap()
|
||||
default = emptyMap(),
|
||||
)
|
||||
|
||||
val repository = DefaultAccountsExpandedRepository(dataStore)
|
||||
|
|
@ -37,9 +37,9 @@ class DefaultAccountsExpandedRepositoryTest {
|
|||
walletId.stringValue to setOf(
|
||||
AccountsExpandedDTO(
|
||||
accountId = mainAccountId.value,
|
||||
isExpanded = true
|
||||
)
|
||||
)
|
||||
isExpanded = true,
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -60,14 +60,14 @@ class DefaultAccountsExpandedRepositoryTest {
|
|||
@Test
|
||||
fun `expandedAccounts emits when update is called`() = runTest {
|
||||
val dataStore = MockStateDataStore<Map<String, Set<AccountsExpandedDTO>>>(
|
||||
default = emptyMap()
|
||||
default = emptyMap(),
|
||||
)
|
||||
|
||||
val repository = DefaultAccountsExpandedRepository(dataStore)
|
||||
|
||||
val state = AccountExpandedState(
|
||||
accountId = mainAccountId,
|
||||
isExpanded = true
|
||||
isExpanded = true,
|
||||
)
|
||||
|
||||
repository.expandedAccounts.test {
|
||||
|
|
@ -94,9 +94,9 @@ class DefaultAccountsExpandedRepositoryTest {
|
|||
mapOf(
|
||||
walletId.stringValue to setOf(
|
||||
AccountsExpandedDTO(mainAccountId.value, true),
|
||||
AccountsExpandedDTO(secondAccountId.value, false)
|
||||
)
|
||||
)
|
||||
AccountsExpandedDTO(secondAccountId.value, false),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
val repository = DefaultAccountsExpandedRepository(dataStore)
|
||||
|
|
@ -109,7 +109,7 @@ class DefaultAccountsExpandedRepositoryTest {
|
|||
// when
|
||||
repository.syncStore(
|
||||
walletId = walletId,
|
||||
existAccounts = setOf(mainAccountId) // without secondAccountId
|
||||
existAccounts = setOf(mainAccountId), // without secondAccountId
|
||||
)
|
||||
|
||||
// then
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.tangem.data.account.store
|
|||
import android.content.Context
|
||||
import com.google.common.truth.Truth
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import io.mockk.clearMocks
|
||||
import io.mockk.mockk
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.tangem.data.account.token
|
||||
|
||||
import arrow.core.right
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.data.account.converter.createGetWalletAccountsResponse
|
||||
import com.tangem.data.account.converter.createWalletAccountDTO
|
||||
import com.tangem.data.account.store.AccountsResponseStore
|
||||
|
|
|
|||
|
|
@ -40,7 +40,12 @@ internal class DefaultMultiNetworkStatusFetcherTest {
|
|||
|
||||
@BeforeEach
|
||||
fun resetMocks() {
|
||||
clearMocks(networksStatusesStore, cardCryptoCurrencyFactory, commonNetworkStatusFetcher, dynamicAddressesInitializer)
|
||||
clearMocks(
|
||||
networksStatusesStore,
|
||||
cardCryptoCurrencyFactory,
|
||||
commonNetworkStatusFetcher,
|
||||
dynamicAddressesInitializer,
|
||||
)
|
||||
// No dynamic addresses restore by default
|
||||
coEvery { dynamicAddressesInitializer.getXpubs(any(), any()) } returns emptyMap()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ internal class DefaultMultiNetworkStatusProducerTest {
|
|||
val networksStatusesFlow = flowOf(simpleStatuses)
|
||||
|
||||
every { networksStatusesStore.get(params.userWalletId) } returns networksStatusesFlow
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
|
||||
every { userWalletsListRepository.userWallets } returns userWalletsFlow
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ internal class DefaultMultiNetworkStatusProducerTest {
|
|||
|
||||
// region every
|
||||
every { networksStatusesStore.get(params.userWalletId) } returns networksStatusesFlow
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
|
||||
every { userWalletsListRepository.userWallets } returns userWalletsFlow
|
||||
every {
|
||||
|
|
@ -235,7 +235,7 @@ internal class DefaultMultiNetworkStatusProducerTest {
|
|||
|
||||
// region every
|
||||
every { networksStatusesStore.get(params.userWalletId) } returns networksStatusesFlow
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
|
||||
every { userWalletsListRepository.userWallets } returns userWalletsFlow
|
||||
|
||||
|
|
@ -319,7 +319,7 @@ internal class DefaultMultiNetworkStatusProducerTest {
|
|||
|
||||
// region every
|
||||
every { networksStatusesStore.get(params.userWalletId) } returns networksStatusesFlow
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
|
||||
every { userWalletsListRepository.userWallets } returns userWalletsFlow
|
||||
every {
|
||||
|
|
@ -407,7 +407,7 @@ internal class DefaultMultiNetworkStatusProducerTest {
|
|||
val networksStatusesFlow = flowOf(simpleStatuses)
|
||||
|
||||
every { networksStatusesStore.get(params.userWalletId) } returns networksStatusesFlow
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
val userWalletsFlow = MutableStateFlow(listOf(userWallet))
|
||||
|
||||
every { userWalletsListRepository.userWallets } returns userWalletsFlow
|
||||
coEvery { networkFactory.create(networkId = any(), any(), any()) } returns null
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package com.tangem.data.networks.store
|
|||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.models.SimpleNetworkStatus
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package com.tangem.data.networks.store
|
|||
|
||||
import androidx.datastore.core.DataStore
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.data.networks.models.SimpleNetworkStatus
|
||||
import com.tangem.data.networks.toDataModel
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.data.networks.models.SimpleNetworkStatus
|
||||
import com.tangem.data.networks.toDataModel
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.data.networks.models.SimpleNetworkStatus
|
||||
import com.tangem.data.networks.toDataModel
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.data.networks.models.SimpleNetworkStatus
|
||||
import com.tangem.data.networks.toDataModel
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.toSimple
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.toSimple
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ internal class StoreAdaptiveThrottleTest {
|
|||
val upstream = MutableSharedFlow<Set<Int>>()
|
||||
|
||||
upstream.adaptiveThrottle().test {
|
||||
|
||||
upstream.emit(setOf(1, 2))
|
||||
assertThat(awaitItem()).isEqualTo(setOf(1, 2))
|
||||
|
||||
|
|
@ -44,7 +43,6 @@ internal class StoreAdaptiveThrottleTest {
|
|||
val upstream = MutableSharedFlow<Set<Int>>()
|
||||
|
||||
upstream.adaptiveThrottle().test {
|
||||
|
||||
upstream.emit(setOf(1, 2))
|
||||
awaitItem()
|
||||
|
||||
|
|
@ -64,7 +62,6 @@ internal class StoreAdaptiveThrottleTest {
|
|||
val upstream = MutableSharedFlow<Set<Int>>()
|
||||
|
||||
upstream.adaptiveThrottle().test {
|
||||
|
||||
upstream.emit(setOf(1, 2))
|
||||
awaitItem()
|
||||
|
||||
|
|
@ -88,7 +85,6 @@ internal class StoreAdaptiveThrottleTest {
|
|||
val upstream = MutableSharedFlow<Set<Int>>()
|
||||
|
||||
upstream.adaptiveThrottle().test {
|
||||
|
||||
upstream.emit(setOf(1, 2))
|
||||
awaitItem()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.toDataModel
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.toDataModel
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.toDataModel
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.tangem.data.networks.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
||||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.models.SimpleNetworkStatus
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ internal class QuoteStatusConverterTest {
|
|||
priceChange24h = BigDecimal.ONE,
|
||||
priceChange1w = null,
|
||||
priceChange30d = null,
|
||||
priceUsd = BigDecimal.ONE
|
||||
priceUsd = BigDecimal.ONE,
|
||||
),
|
||||
),
|
||||
expected = QuoteStatus(
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ internal class DefaultMultiQuoteStatusFetcherTest {
|
|||
),
|
||||
)
|
||||
|
||||
val fields = setOf(QuotesFetcher.Field.PRICE, QuotesFetcher.Field.PRICE_CHANGE_24H, QuotesFetcher.Field.PRICE_USD)
|
||||
val fields =
|
||||
setOf(QuotesFetcher.Field.PRICE, QuotesFetcher.Field.PRICE_CHANGE_24H, QuotesFetcher.Field.PRICE_USD)
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ package com.tangem.data.quotes.multi
|
|||
|
||||
import arrow.core.right
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.data.quotes.store.QuotesStatusesStore
|
||||
import com.tangem.datasource.api.tangemTech.models.CurrenciesResponse
|
||||
import com.tangem.datasource.appcurrency.AppCurrencyResponseStore
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.tangem.data.quotes.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.common.test.data.quote.MockQuoteResponseFactory
|
||||
import com.tangem.common.test.data.quote.toDomain
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.datasource.local.datastore.RuntimeSharedStore
|
||||
import com.tangem.domain.models.StatusSource
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ package com.tangem.data.quotes.store
|
|||
|
||||
import androidx.datastore.core.DataStore
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.common.test.data.quote.MockQuoteResponseFactory
|
||||
import com.tangem.common.test.data.quote.toDomain
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.datasource.local.datastore.RuntimeSharedStore
|
||||
import com.tangem.domain.models.StatusSource
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package com.tangem.data.staking.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.common.test.data.staking.MockYieldBalanceWrapperDTOFactory
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.data.staking.toDomain
|
||||
import com.tangem.datasource.local.datastore.RuntimeSharedStore
|
||||
import com.tangem.domain.models.staking.StakingBalance
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ package com.tangem.data.staking.store
|
|||
|
||||
import androidx.datastore.core.DataStore
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.common.test.data.staking.MockYieldBalanceWrapperDTOFactory
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.data.staking.toDomain
|
||||
import com.tangem.datasource.local.datastore.RuntimeSharedStore
|
||||
import com.tangem.domain.models.staking.StakingBalance
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package com.tangem.data.staking.store
|
||||
|
||||
import com.google.common.truth.Truth
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.common.test.data.staking.MockYieldBalanceWrapperDTOFactory
|
||||
import com.tangem.common.test.datastore.MockStateDataStore
|
||||
import com.tangem.test.core.datastore.MockStateDataStore
|
||||
import com.tangem.data.staking.toDomain
|
||||
import com.tangem.datasource.api.stakekit.models.response.model.YieldBalanceWrapperDTO
|
||||
import com.tangem.datasource.local.datastore.RuntimeSharedStore
|
||||
|
|
|
|||
|
|
@ -85,6 +85,5 @@ dependencies {
|
|||
|
||||
/** Test */
|
||||
testRuntimeOnly(deps.test.junit5.engine)
|
||||
testImplementation(projects.common.test)
|
||||
testImplementation(projects.test.core)
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ package com.tangem.data.pay.repository
|
|||
|
||||
import arrow.core.left
|
||||
import arrow.core.right
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.data.common.quote.QuotesFetcher
|
||||
import com.tangem.datasource.api.common.response.ApiResponse
|
||||
import com.tangem.datasource.api.common.response.ApiResponseError
|
||||
|
|
|
|||
|
|
@ -46,5 +46,5 @@ dependencies {
|
|||
testImplementation(deps.test.mockk)
|
||||
testImplementation(deps.test.coroutine)
|
||||
testImplementation(deps.test.truth)
|
||||
testImplementation(projects.common.test)
|
||||
testImplementation(projects.test.core)
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ package com.tangem.domain.pay.usecase
|
|||
import arrow.core.left
|
||||
import arrow.core.right
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.domain.models.pay.TangemPayCardFrozenState
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.pay.model.OrderStatus
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.tangem.domain.pay.usecase
|
|||
import arrow.core.left
|
||||
import arrow.core.right
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.pay.flow.PaymentAccountStatusFetcher
|
||||
import com.tangem.domain.pay.model.OrderStatus
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ dependencies {
|
|||
implementation(deps.arrow.core)
|
||||
|
||||
/** tests */
|
||||
testImplementation(projects.common.test)
|
||||
testImplementation(projects.test.core)
|
||||
testImplementation(deps.test.junit5)
|
||||
testRuntimeOnly(deps.test.junit5.engine)
|
||||
testImplementation(deps.test.coroutine)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.tangem.domain.yield.supply.usecase
|
|||
|
||||
import arrow.core.Either
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import com.tangem.common.test.TestAppCoroutineScope
|
||||
import com.tangem.test.core.TestAppCoroutineScope
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.network.Network
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", v
|
|||
lifecycle-viewModel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidxLifecycle" }
|
||||
lifecycle-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "compose-lifecycle-runtime" }
|
||||
androidx-datastore = { module = "androidx.datastore:datastore-preferences", version.ref = "androidx-datastore" }
|
||||
androidx-datastore-core = { module = "androidx.datastore:datastore-core", version.ref = "androidx-datastore" }
|
||||
androidx-workmanager = { module = "androidx.work:work-runtime", version.ref = "androidxWorkManager" }
|
||||
hilt-work = { module = "androidx.hilt:hilt-work", version.ref = "hilt-work" }
|
||||
# region AndroidX
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ plugins {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation(projects.core.utils)
|
||||
implementation(deps.arrow.core)
|
||||
|
||||
api(deps.androidx.datastore.core)
|
||||
api(deps.test.coroutine)
|
||||
api(deps.test.junit5)
|
||||
api(deps.test.mockk)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.common.test
|
||||
package com.tangem.test.core
|
||||
|
||||
import com.tangem.utils.coroutines.AppCoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem.common.test.datastore
|
||||
package com.tangem.test.core.datastore
|
||||
|
||||
import androidx.datastore.core.DataStore
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
Loading…
Add table
Add a link
Reference in a new issue