Updated on 2026-08-14
This commit is contained in:
parent
65d2e84c6e
commit
9e986a6cb3
21 changed files with 180 additions and 77 deletions
|
|
@ -76,6 +76,7 @@ internal class PaymentAccountStatusValueDMConverter @Inject constructor(
|
|||
// Transient statuses are not persisted
|
||||
is PaymentAccountStatusValue.Loading,
|
||||
is PaymentAccountStatusValue.AwaitingPlanSelection,
|
||||
is PaymentAccountStatusValue.Inactive,
|
||||
is PaymentAccountStatusValue.Error.ExposedDevice,
|
||||
is PaymentAccountStatusValue.Error.Unavailable,
|
||||
is PaymentAccountStatusValue.Error.NotSynced,
|
||||
|
|
|
|||
|
|
@ -108,7 +108,28 @@ internal class PaymentAccountStatusValueDMConverterTest {
|
|||
// GIVEN
|
||||
val domain = PaymentAccountStatusValue.AwaitingPlanSelection(
|
||||
source = StatusSource.ACTUAL,
|
||||
tariffPlan = null,
|
||||
cryptoCurrency = cryptoCurrency,
|
||||
tariffPlan = mockk(),
|
||||
)
|
||||
|
||||
// WHEN
|
||||
val result = converter.convert(domain)
|
||||
|
||||
// THEN
|
||||
assertThat(result).isNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `GIVEN domain Inactive WHEN convert THEN returns null (transient, not persisted)`() {
|
||||
// GIVEN
|
||||
val domain = PaymentAccountStatusValue.Inactive(
|
||||
source = StatusSource.ACTUAL,
|
||||
fiatBalance = PaymentAccountStatusValue.FiatBalance(
|
||||
availableBalance = BigDecimal("100"),
|
||||
currency = "USD",
|
||||
),
|
||||
cryptoCurrency = cryptoCurrency,
|
||||
tariffPlan = mockk(),
|
||||
)
|
||||
|
||||
// WHEN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue