File tree 1 file changed +15
-1
lines changed
paymentsheet/src/test/java/com/stripe/android/paymentsheet/ui
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ internal class DefaultCardEditUIHandlerTest {
58
58
59
59
handler.brandChanged(CardBrand .Visa )
60
60
61
- assertThat(cardUpdateParams?.cardBrand ).isEqualTo(CardBrand .Visa )
61
+ assertThat(cardUpdateParams).isEqualTo(cardUpdateParams(cardBrand = CardBrand .Visa ) )
62
62
63
63
handler.brandChanged(CardBrand .CartesBancaires )
64
64
@@ -95,6 +95,20 @@ internal class DefaultCardEditUIHandlerTest {
95
95
private val DefaultCardEditUIHandler .selectedBrand
96
96
get() = uiState.selectedCardBrand.brand
97
97
98
+ private fun cardUpdateParams (
99
+ expiryMonth : Int? = null,
100
+ expiryYear : Int? = null,
101
+ cardBrand : CardBrand ? = null,
102
+ billingDetails : PaymentMethod .BillingDetails ? = null
103
+ ): CardUpdateParams {
104
+ return CardUpdateParams (
105
+ expiryMonth = expiryMonth,
106
+ expiryYear = expiryYear,
107
+ cardBrand = cardBrand,
108
+ billingDetails = billingDetails
109
+ )
110
+ }
111
+
98
112
private fun handler (
99
113
card : PaymentMethod .Card = PaymentMethodFixtures .CARD_WITH_NETWORKS ,
100
114
cardBrandFilter : CardBrandFilter = DefaultCardBrandFilter ,
You can’t perform that action at this time.
0 commit comments