-
Notifications
You must be signed in to change notification settings - Fork 991
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MBL-1992: Currency format for PaymentIncrement (#2203)
- Loading branch information
Showing
5 changed files
with
125 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -266,6 +266,20 @@ class StringExtKtTest : KSRobolectricTestCase() { | |
assertNull(null.toInteger()) | ||
} | ||
|
||
@Test | ||
fun findCurrencySymbolIndex_whenCurrencySymbolIsMultiple_returnsFirstIndex() { | ||
val text = "USD $123.45 €" | ||
val index = text.findCurrencySymbolIndex() | ||
assertEquals(index, 4) | ||
} | ||
|
||
@Test | ||
fun findCurrencySymbolIndex_whenNoCurrencySymbolIsPresent_returnsNull() { | ||
val text = "123.45" | ||
val index = text.findCurrencySymbolIndex() | ||
assertNull(index) | ||
} | ||
|
||
companion object { | ||
private const val VALID_EMAIL = "[email protected]" | ||
private const val VALID_GIF_URL = "https://i.kickstarter.com/assets/035/272/960/eae68383730822ffe949f3825600a80a_original.gif?origin=ugc-qa&q=92&sig=C1dWB6NvmlwKGw4lty6s4FGU6Dn3rzNv%2F3p%2B4bhSpzk%3D" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters