mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-07-22 10:15:50 +00:00
fix: add missing test-shared dependency for feature-wallet-impl unit tests
RealTronTransactionServiceTest needed test-shared's Mockito helpers
(whenever/eq/any/argThat), but feature-wallet-impl never declared
testImplementation project(':test-shared') - every other module that uses
these helpers (feature-account-impl, runtime, common, etc.) already does.
Also pin two ambiguous-without-it type inferences (argThat's lambda param,
emptyMap's type args) explicitly rather than relying on the dependency fix
alone to un-cascade them.
This commit is contained in:
+2
-2
@@ -133,7 +133,7 @@ class RealTronTransactionServiceTest {
|
||||
// equality in Kotlin, so this must compare contents (contentEquals), not rely on SignerPayloadRaw.equals().
|
||||
val expectedMessage = rawDataHex.fromHex().sha256()
|
||||
verify(signer).signRaw(
|
||||
argThat<SignerPayloadRaw> { payload ->
|
||||
argThat<SignerPayloadRaw> { payload: SignerPayloadRaw ->
|
||||
payload.message.contentEquals(expectedMessage) &&
|
||||
payload.accountId.contentEquals(ownerAccountId) &&
|
||||
payload.skipMessageHashing
|
||||
@@ -186,7 +186,7 @@ class RealTronTransactionServiceTest {
|
||||
|
||||
whenever(tronGridApi.createNativeTransfer(eq(baseUrl), eq(ownerHex), eq(recipientHex), eq(amountSun))).thenReturn(unsigned)
|
||||
whenever(tronGridApi.getAccountResource(eq(baseUrl), eq(ownerHex))).thenReturn(TronAccountResourceResponse())
|
||||
whenever(tronGridApi.getChainParameters(eq(baseUrl))).thenReturn(emptyMap())
|
||||
whenever(tronGridApi.getChainParameters(eq(baseUrl))).thenReturn(emptyMap<String, Long>())
|
||||
|
||||
val fee = subject.calculateFee(
|
||||
chain = chain,
|
||||
|
||||
Reference in New Issue
Block a user