From e3f33c61d8108338218cd51bc5e294475c4cc004 Mon Sep 17 00:00:00 2001 From: Scott Antonac Date: Fri, 4 Aug 2023 16:40:12 +1000 Subject: [PATCH] EIT-3042 - lint fixes --- .../com/afterpay/android/internal/AfterpayInstalment.kt | 2 +- .../src/test/kotlin/com/afterpay/android/AfterpayEnabled.kt | 2 +- .../com/afterpay/android/AfterpayInstalmentLocaleTest.kt | 1 - afterpay/src/test/kotlin/com/afterpay/android/AfterpayTest.kt | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/afterpay/src/main/kotlin/com/afterpay/android/internal/AfterpayInstalment.kt b/afterpay/src/main/kotlin/com/afterpay/android/internal/AfterpayInstalment.kt index 6ac2f723..0d0acc0b 100644 --- a/afterpay/src/main/kotlin/com/afterpay/android/internal/AfterpayInstalment.kt +++ b/afterpay/src/main/kotlin/com/afterpay/android/internal/AfterpayInstalment.kt @@ -33,7 +33,7 @@ internal sealed class AfterpayInstalment { currencyLocales.isEmpty() -> { return NotAvailable( minimumAmount = null, - maximumAmount = "0" + maximumAmount = "0", ) } currencyLocales.count() == 1 -> currencyLocales.first() diff --git a/afterpay/src/test/kotlin/com/afterpay/android/AfterpayEnabled.kt b/afterpay/src/test/kotlin/com/afterpay/android/AfterpayEnabled.kt index bf0f0cfe..b6058214 100644 --- a/afterpay/src/test/kotlin/com/afterpay/android/AfterpayEnabled.kt +++ b/afterpay/src/test/kotlin/com/afterpay/android/AfterpayEnabled.kt @@ -47,7 +47,7 @@ class AfterpayEnabled { @Test fun `Afterpay is enabled for merchant locales`() { - for(locale in validMerchantLocales) { + for (locale in validMerchantLocales) { Afterpay.setConfiguration( minimumAmount = "10.00", maximumAmount = "1000.00", diff --git a/afterpay/src/test/kotlin/com/afterpay/android/AfterpayInstalmentLocaleTest.kt b/afterpay/src/test/kotlin/com/afterpay/android/AfterpayInstalmentLocaleTest.kt index bdc3eb3d..e06fccc5 100644 --- a/afterpay/src/test/kotlin/com/afterpay/android/AfterpayInstalmentLocaleTest.kt +++ b/afterpay/src/test/kotlin/com/afterpay/android/AfterpayInstalmentLocaleTest.kt @@ -84,7 +84,6 @@ class AfterpayInstalmentLocaleTest { fun `unavailable instalment in fr-CA locale`() { val instalments = createAllUnavailableInstalments(oneHundredAndTwenty, Locales.FR_CA) - assertEquals("$10 AUD", instalments.aud.minimumAmount) assertEquals("10 $", instalments.cad.minimumAmount) assertEquals("£10", instalments.gbp.minimumAmount) diff --git a/afterpay/src/test/kotlin/com/afterpay/android/AfterpayTest.kt b/afterpay/src/test/kotlin/com/afterpay/android/AfterpayTest.kt index c1f88064..69b3e1f9 100644 --- a/afterpay/src/test/kotlin/com/afterpay/android/AfterpayTest.kt +++ b/afterpay/src/test/kotlin/com/afterpay/android/AfterpayTest.kt @@ -13,7 +13,7 @@ class AfterpayTest { Locale.ITALY, Locale.FRANCE, Locale("es", "ES"), - Locale.JAPAN + Locale.JAPAN, ) @Test @@ -119,7 +119,7 @@ class AfterpayTest { @Test fun `setConfiguration throws for a locale not in the valid set`() { assertThrows(IllegalArgumentException::class.java) { - for(locale in invalidMerchantLocales) { + for (locale in invalidMerchantLocales) { Afterpay.setConfiguration( minimumAmount = "10.00", maximumAmount = "1000.00",