diff --git a/stripe/src/main/java/com/stripe/android/view/FpxBank.kt b/stripe/src/main/java/com/stripe/android/view/FpxBank.kt index 012930cb360..f8ec85c06bc 100644 --- a/stripe/src/main/java/com/stripe/android/view/FpxBank.kt +++ b/stripe/src/main/java/com/stripe/android/view/FpxBank.kt @@ -9,12 +9,22 @@ enum class FpxBank( val displayName: String, val brandIconResId: Int = R.drawable.stripe_ic_bank_generic ) { + Maybank2U("MB2U0227", "maybank2u", "Maybank2U", + R.drawable.stripe_ic_bank_maybank), + Cimb("BCBB0235", "cimb", "CIMB Clicks", + R.drawable.stripe_ic_bank_cimb), + PublicBank("PBB0233", "public_bank", "Public Bank", + R.drawable.stripe_ic_bank_public), + Rhb("RHB0218", "rhb", "RHB Bank", + R.drawable.stripe_ic_bank_rhb), + HongLeongBank("HLB0224", "hong_leong_bank", "Hong Leong Bank", + R.drawable.stripe_ic_bank_hong_leong), + AmBank("AMBB0209", "ambank", "AmBank", + R.drawable.stripe_ic_bank_ambank), AffinBank("ABB0233", "affin_bank", "Affin Bank", R.drawable.stripe_ic_bank_affin), - AllianceBankBusiness("ABMB0212", "alliance_bank", "Alliance Bank (Personal)", + AllianceBankBusiness("ABMB0212", "alliance_bank", "Alliance Bank", R.drawable.stripe_ic_bank_alliance), - AmBank("AMBB0209", "ambank", "AmBank", - R.drawable.stripe_ic_bank_ambank), BankIslam("BIMB0340", "bank_islam", "Bank Islam", R.drawable.stripe_ic_bank_islam), BankMuamalat("BMMB0341", "bank_muamalat", "Bank Muamalat", @@ -23,27 +33,17 @@ enum class FpxBank( R.drawable.stripe_ic_bank_raykat), Bsn("BSN0601", "bsn", "BSN", R.drawable.stripe_ic_bank_bsn), - Cimb("BCBB0235", "cimb", "CIMB Clicks", - R.drawable.stripe_ic_bank_cimb), - HongLeongBank("HLB0224", "hong_leong_bank", "Hong Leong Bank", - R.drawable.stripe_ic_bank_hong_leong), - Hsbc("HSBC0223", "hsbc", "HSBC BANK", + Hsbc("HSBC0223", "hsbc", "HSBC Bank", R.drawable.stripe_ic_bank_hsbc), Kfh("KFH0346", "kfh", "KFH", R.drawable.stripe_ic_bank_kfh), Maybank2E("MBB0228", "maybank2e", "Maybank2E", R.drawable.stripe_ic_bank_maybank), - Maybank2U("MB2U0227", "maybank2u", "Maybank2U", - R.drawable.stripe_ic_bank_maybank), Ocbc("OCBC0229", "ocbc", "OCBC Bank", R.drawable.stripe_ic_bank_ocbc), - PublicBank("PBB0233", "public_bank", "Public Bank", - R.drawable.stripe_ic_bank_public), - Rhb("RHB0218", "rhb", "RHB Bank", - R.drawable.stripe_ic_bank_rhb), StandardChartered("SCB0216", "standard_chartered", "Standard Chartered", R.drawable.stripe_ic_bank_standard_chartered), - UobBank("UOB0226", "uob", "UOB Bank", + UobBank("UOB0226", "uob", "UOB", R.drawable.stripe_ic_bank_uob); companion object { diff --git a/stripe/src/test/java/com/stripe/android/view/FpxBankTest.kt b/stripe/src/test/java/com/stripe/android/view/FpxBankTest.kt index 2a96c059a31..787fdd0253c 100644 --- a/stripe/src/test/java/com/stripe/android/view/FpxBankTest.kt +++ b/stripe/src/test/java/com/stripe/android/view/FpxBankTest.kt @@ -1,5 +1,6 @@ package com.stripe.android.view +import com.google.common.truth.Truth.assertThat import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNull @@ -14,4 +15,31 @@ class FpxBankTest { fun testGet_withInvalidBank() { assertNull(FpxBank.get("not_a_bank")) } + + @Test + fun testOrder() { + val expected = listOf( + "Maybank2U", + "CIMB Clicks", + "Public Bank", + "RHB Bank", + "Hong Leong Bank", + "AmBank", + "Affin Bank", + "Alliance Bank", + "Bank Islam", + "Bank Muamalat", + "Bank Rakyat", + "BSN", + "HSBC Bank", + "KFH", + "Maybank2E", + "OCBC Bank", + "Standard Chartered", + "UOB" + ) + val actual = FpxBank.values().map { it.displayName } + assertThat(expected) + .isEqualTo(actual) + } }