mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-10-20 18:56:25 +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:
1 parent
9de7267a58
commit
096d3d61ed
2 files changed
+3
-2
No files matched your search
@@ -71,6 +71,7 @@ dependencies {
|
|||||||
|
|
||||||
testImplementation jUnitDep
|
testImplementation jUnitDep
|
||||||
testImplementation mockitoDep
|
testImplementation mockitoDep
|
||||||
|
testImplementation project(':test-shared')
|
||||||
|
|
||||||
implementation substrateSdkDep
|
implementation substrateSdkDep
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -133,7 +133,7 @@ class RealTronTransactionServiceTest {
|
|||||||
// equality in Kotlin, so this must compare contents (contentEquals), not rely on SignerPayloadRaw.equals().
|
// equality in Kotlin, so this must compare contents (contentEquals), not rely on SignerPayloadRaw.equals().
|
||||||
val expectedMessage = rawDataHex.fromHex().sha256()
|
val expectedMessage = rawDataHex.fromHex().sha256()
|
||||||
verify(signer).signRaw(
|
verify(signer).signRaw(
|
||||||
argThat<SignerPayloadRaw> { payload ->
|
argThat<SignerPayloadRaw> { payload: SignerPayloadRaw ->
|
||||||
payload.message.contentEquals(expectedMessage) &&
|
payload.message.contentEquals(expectedMessage) &&
|
||||||
payload.accountId.contentEquals(ownerAccountId) &&
|
payload.accountId.contentEquals(ownerAccountId) &&
|
||||||
payload.skipMessageHashing
|
payload.skipMessageHashing
|
||||||
@@ -186,7 +186,7 @@ class RealTronTransactionServiceTest {
|
|||||||
|
|
||||||
whenever(tronGridApi.createNativeTransfer(eq(baseUrl), eq(ownerHex), eq(recipientHex), eq(amountSun))).thenReturn(unsigned)
|
whenever(tronGridApi.createNativeTransfer(eq(baseUrl), eq(ownerHex), eq(recipientHex), eq(amountSun))).thenReturn(unsigned)
|
||||||
whenever(tronGridApi.getAccountResource(eq(baseUrl), eq(ownerHex))).thenReturn(TronAccountResourceResponse())
|
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(
|
val fee = subject.calculateFee(
|
||||||
chain = chain,
|
chain = chain,
|
||||||
|
|||||||
Reference in new issue
Block a user