diff --git a/README.md b/README.md index e44eb9ea..5b9ec29c 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ With Tradukisto, you can now transform numbers into their word equivalents easy ## Supported languages +* 🇧🇩 Bangla * 🇧🇷đŸ‡ĩ🇹 Brazilian Portuguese * 🇧đŸ‡Ŧ Bulgarian * 🇭🇷 Croatian @@ -43,6 +44,7 @@ With Tradukisto, you can now transform numbers into their word equivalents easy * 🇹🇷 Turkish * đŸ‡ēđŸ‡Ļ Ukrainian + Is your language missing from the list? We encourage you to contribute to our project. ## Usage diff --git a/src/main/java/pl/allegro/finance/tradukisto/MoneyConverters.java b/src/main/java/pl/allegro/finance/tradukisto/MoneyConverters.java index c7d45793..4b016ded 100644 --- a/src/main/java/pl/allegro/finance/tradukisto/MoneyConverters.java +++ b/src/main/java/pl/allegro/finance/tradukisto/MoneyConverters.java @@ -27,6 +27,7 @@ import static pl.allegro.finance.tradukisto.internal.Container.ukrainianContainer; import static pl.allegro.finance.tradukisto.internal.Container.bulgarianContainer; import static pl.allegro.finance.tradukisto.internal.Container.dutchContainer; +import static pl.allegro.finance.tradukisto.internal.Container.banglaContainer; public enum MoneyConverters { @@ -49,6 +50,7 @@ public enum MoneyConverters { FRENCH_BANKING_MONEY_VALUE(frenchContainer().getBankingMoneyConverter()), BULGARIAN_BANKING_MONEY_VALUE(bulgarianContainer().getBankingMoneyConverter()), DUTCH_BANKING_MONEY_VALUE(dutchContainer().getBankingMoneyConverter()), + BANGLA_BANKING_MONEY_VALUE(banglaContainer().getBankingMoneyConverter()), SPANISH_BANKING_MONEY_VALUE(spanishContainer().getBankingMoneyConverter()), HINDI_BANKING_MONEY_VALUE(Container.hindiContainer().getBankingMoneyConverter()), SWEDISH_BANKING_MONEY_VALUE(swedishContainer().getBankingMoneyConverter()); diff --git a/src/main/java/pl/allegro/finance/tradukisto/internal/Container.java b/src/main/java/pl/allegro/finance/tradukisto/internal/Container.java index 4c95252b..58941327 100644 --- a/src/main/java/pl/allegro/finance/tradukisto/internal/Container.java +++ b/src/main/java/pl/allegro/finance/tradukisto/internal/Container.java @@ -48,6 +48,7 @@ import pl.allegro.finance.tradukisto.internal.languages.turkish.TurkishSmallNumbersToWordsConverter; import pl.allegro.finance.tradukisto.internal.languages.turkish.TurkishValues; import pl.allegro.finance.tradukisto.internal.languages.ukrainian.UkrainianValues; +import pl.allegro.finance.tradukisto.internal.languages.bangla.BanglaValues; public final class Container { @@ -320,4 +321,9 @@ public LongToStringConverter getLongConverter() { public BigDecimalToStringConverter getBankingMoneyConverter() { return bigDecimalConverter; } + + public static Container banglaContainer() { + TurkishValues values = new BanglaValues(); + return new Container(new BanglaValues()); + } } diff --git a/src/main/java/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaPluralForms.java b/src/main/java/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaPluralForms.java new file mode 100644 index 00000000..0f5e6217 --- /dev/null +++ b/src/main/java/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaPluralForms.java @@ -0,0 +1,22 @@ +package pl.allegro.finance.tradukisto.internal.languages.bangla; + +import pl.allegro.finance.tradukisto.internal.languages.GenderForms; +import pl.allegro.finance.tradukisto.internal.languages.PluralForms; + +public class BanglaPluralForms implements PluralForms { + private final String form; + + public BanglaPluralForms(String form) { + this.form = form; + } + + @Override + public String formFor(Integer value) { + return form; + } + + @Override + public GenderType genderType() { + return GenderType.NON_APPLICABLE; + } +} diff --git a/src/main/java/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaValues.java b/src/main/java/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaValues.java new file mode 100644 index 00000000..5279bdd9 --- /dev/null +++ b/src/main/java/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaValues.java @@ -0,0 +1,73 @@ +package pl.allegro.finance.tradukisto.internal.languages.bangla; + +import pl.allegro.finance.tradukisto.internal.BaseValues; +import pl.allegro.finance.tradukisto.internal.languages.GenderForms; +import pl.allegro.finance.tradukisto.internal.languages.PluralForms; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import static pl.allegro.finance.tradukisto.internal.languages.GenderForms.genderForms; +import static pl.allegro.finance.tradukisto.internal.support.BaseNumbersBuilder.baseNumbersBuilder; + +public class BanglaValues implements BaseValues { + @Override + public Map baseNumbers() { + return baseNumbersBuilder() + .put(1, "āĻļā§‚āĻ¨ā§āĻ¯") + .put(1, "āĻāĻ•") + .put(2, "āĻĻā§āĻ‡") + .put(3, "āĻ¤āĻŋāĻ¨") + .put(4, "āĻšāĻžāĻ°") + .put(5, "āĻĒāĻžāĻāĻš") + .put(6, "āĻ›āĻ¯āĻŧ") + .put(7, "āĻ¸āĻžāĻ¤") + .put(8, "āĻ†āĻŸ") + .put(9, "āĻ¨āĻ¯āĻŧ") + .put(10, "āĻĻāĻļ") + .put(11, "āĻāĻ—āĻžāĻ°ā§‹") + .put(12, "āĻŦāĻžāĻ°ā§‹") + .put(13, "āĻ¤ā§‡āĻ°ā§‹") + .put(14, "āĻšā§ŒāĻĻā§āĻĻ") + .put(15, "āĻĒāĻ¨ā§‡āĻ°ā§‹") + .put(16, "āĻˇā§‹āĻ˛") + .put(17, "āĻ¸āĻ¤ā§‡āĻ°ā§‹") + .put(18, "āĻ†āĻ āĻžāĻ°ā§‹") + .put(19, "āĻŠāĻ¨āĻŋāĻļ") + .put(20, "āĻŦāĻŋāĻļ") + .put(30, "āĻ¤ā§āĻ°āĻŋāĻļ") + .put(40, "āĻšāĻ˛ā§āĻ˛āĻŋāĻļ") + .put(50, "āĻĒāĻžā§āĻšāĻžāĻļ") + .put(60, "āĻˇāĻžāĻŸ") + .put(70, "āĻ¸āĻ¤ā§āĻ¤āĻ°") + .put(80, "āĻ†āĻļāĻŋ") + .put(90, "āĻ¨āĻŦā§āĻŦāĻ‡") + .put(100, "āĻāĻ•āĻļā§‹") + .put(200, "āĻĻā§āĻ‡āĻļā§‹") + .put(300, "āĻ¤āĻŋāĻ¨āĻļā§‹") + .put(400, "āĻšāĻžāĻ°āĻļā§‹") + .put(500, "āĻĒāĻžāĻāĻšāĻļā§‹") + .put(600, "āĻ›āĻ¯āĻŧāĻļā§‹") + .put(700, "āĻ¸āĻžāĻ¤āĻļā§‹") + .put(800, "āĻ†āĻŸāĻļā§‹") + .put(900, "āĻ¨āĻ¯āĻŧāĻļā§‹") + .build(); + } + + @Override + public List pluralForms() { + return Arrays.asList( + new BanglaPluralForms(""), + new BanglaPluralForms("āĻāĻ• āĻšāĻžāĻœāĻžāĻ°"), + new BanglaPluralForms("āĻĻāĻļ āĻšāĻžāĻœāĻžāĻ°"), + new BanglaPluralForms("āĻāĻ• āĻ˛āĻ•ā§āĻˇ"), + new BanglaPluralForms("āĻĻāĻļ āĻ˛āĻ•ā§āĻˇ"), + new BanglaPluralForms("āĻāĻ• āĻ•ā§‹āĻŸāĻŋ"), + new BanglaPluralForms("āĻĻāĻļ āĻ•ā§‹āĻŸāĻŋ")); + } + + public String currency() { + return "ā§ŗ"; + } +} \ No newline at end of file diff --git a/src/test/groovy/pl/allegro/finance/tradukisto/MoneyConvertersTest.groovy b/src/test/groovy/pl/allegro/finance/tradukisto/MoneyConvertersTest.groovy index 01d5ae51..c3a4ae29 100644 --- a/src/test/groovy/pl/allegro/finance/tradukisto/MoneyConvertersTest.groovy +++ b/src/test/groovy/pl/allegro/finance/tradukisto/MoneyConvertersTest.groovy @@ -24,6 +24,7 @@ import static pl.allegro.finance.tradukisto.MoneyConverters.SWEDISH_BANKING_MONE import static pl.allegro.finance.tradukisto.MoneyConverters.TURKISH_BANKING_MONEY_VALUE import static pl.allegro.finance.tradukisto.MoneyConverters.UKRAINIAN_BANKING_MONEY_VALUE import static pl.allegro.finance.tradukisto.MoneyConverters.DUTCH_BANKING_MONEY_VALUE +import static pl.allegro.finance.tradukisto.MoneyConverters.BANGLA_BANKING_MONEY_VALUE class MoneyConvertersTest extends Specification { @@ -54,6 +55,7 @@ class MoneyConvertersTest extends Specification { "Swedish" | SWEDISH_BANKING_MONEY_VALUE || "ett tusen tvÃĨ hundra och trettiofyra kr 56/100" "Turkish" | TURKISH_BANKING_MONEY_VALUE || "BinÄ°kiYÃŧzOtuzDÃļrtTL,ElliAltÄąKr." "Ukrainian" | UKRAINIAN_BANKING_MONEY_VALUE || "ОдĐŊĐ° Ņ‚иŅŅŅ‡Đ° двŅ–ŅŅ‚Ņ– Ņ‚Ņ€Đ¸Đ´Ņ†ŅŅ‚ŅŒ Ņ‡ĐžŅ‚иŅ€Đ¸ ₴ 56/100" + "Bangla" | BANGLA_BANKING_MONEY_VALUE || "āĻāĻ• āĻšāĻžāĻœāĻžāĻ° āĻĻā§āĻ‡āĻļāĻ¤ āĻšā§ŒāĻ¤ā§āĻ°āĻŋāĻļ ā§ŗ ā§Ģā§Ŧ/ā§§ā§Ļā§Ļ" "Hindi" | HINDI_BANKING_MONEY_VALUE || "ā¤ā¤• ā¤šā¤œā¤žā¤° ā¤ĻāĨ‹ ā¤¸āĨŒ ā¤šāĨŒā¤‚ā¤¤āĨ€ā¤¸ ₹,ā¤›ā¤ĒāĨā¤Ēā¤¨ p" } diff --git a/src/test/groovy/pl/allegro/finance/tradukisto/ValueConvertersTest.groovy b/src/test/groovy/pl/allegro/finance/tradukisto/ValueConvertersTest.groovy index 80ee6692..80aac157 100644 --- a/src/test/groovy/pl/allegro/finance/tradukisto/ValueConvertersTest.groovy +++ b/src/test/groovy/pl/allegro/finance/tradukisto/ValueConvertersTest.groovy @@ -23,6 +23,7 @@ import static pl.allegro.finance.tradukisto.ValueConverters.SWEDISH_INTEGER import static pl.allegro.finance.tradukisto.ValueConverters.TURKISH_INTEGER import static pl.allegro.finance.tradukisto.ValueConverters.UKRAINIAN_INTEGER import static pl.allegro.finance.tradukisto.ValueConverters.DUTCH_INTEGER +import static pl.allegro.finance.tradukisto.ValueConverters.BANGLA_INTEGER import static pl.allegro.finance.tradukisto.ValueConverters.getByLanguageCodeOrDefault import static pl.allegro.finance.tradukisto.ValueConverters.getByLocaleOrDefault @@ -54,6 +55,7 @@ class ValueConvertersTest extends Specification { "Swedish" | SWEDISH_INTEGER || "ett tusen tvÃĨ hundra och trettiofyra" "Turkish" | TURKISH_INTEGER || "Bin Ä°ki YÃŧz Otuz DÃļrt" "Ukrainian" | UKRAINIAN_INTEGER || "ОдĐŊĐ° Ņ‚иŅŅŅ‡Đ° двŅ–ŅŅ‚Ņ– Ņ‚Ņ€Đ¸Đ´Ņ†ŅŅ‚ŅŒ Ņ‡ĐžŅ‚иŅ€Đ¸" + "Bangla" | BANGLA_INTEGER || "āĻāĻ• āĻšāĻžāĻœāĻžāĻ° āĻĻā§āĻ‡āĻļāĻ¤ āĻšā§ŒāĻ¤ā§āĻ°āĻŋāĻļ" "Hindi" | HINDI_INTEGER || "ā¤ā¤• ā¤šā¤œā¤žā¤° ā¤ĻāĨ‹ ā¤¸āĨŒ ā¤šāĨŒā¤‚ā¤¤āĨ€ā¤¸" } @@ -98,6 +100,7 @@ class ValueConvertersTest extends Specification { new Locale("tr") || TURKISH_INTEGER new Locale("uk") || UKRAINIAN_INTEGER new Locale("nl") || DUTCH_INTEGER + new Locale("bd") || BANGLA_INTEGER new Locale("hi") || HINDI_INTEGER new Locale("sv") || SWEDISH_INTEGER } @@ -146,6 +149,7 @@ class ValueConvertersTest extends Specification { "es" || SPANISH_INTEGER "tr" || TURKISH_INTEGER "uk" || UKRAINIAN_INTEGER + "bd" || BANGLA_INTEGER "hi" || HINDI_INTEGER "sv" || SWEDISH_INTEGER } diff --git a/src/test/groovy/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaValuesTest.groovy b/src/test/groovy/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaValuesTest.groovy new file mode 100644 index 00000000..81eaf7a1 --- /dev/null +++ b/src/test/groovy/pl/allegro/finance/tradukisto/internal/languages/bangla/BanglaValuesTest.groovy @@ -0,0 +1,146 @@ +package pl.allegro.finance.tradukisto.internal.languages.bangla + +import spock.lang.Specification +import spock.lang.Unroll + +import static pl.allegro.finance.tradukisto.internal.Container.banglaContainer + +class BanglaValuesTest extends Specification { + + static intConverter = banglaContainer().getIntegerConverter() + static longConverter = banglaContainer().getLongConverter() + + @Unroll + def "should convert #value to '#words' in Bangla"() { + expect: + intConverter.asWords(value) == words + + where: + value | words + 0 | "āĻļā§‚āĻ¨ā§āĻ¯" + 1 | "āĻāĻ•" + 2 | "āĻĻā§āĻ‡" + 3 | "āĻ¤āĻŋāĻ¨" + 4 | "āĻšāĻžāĻ°" + 5 | "āĻĒāĻžāĻāĻš" + 6 | "āĻ›āĻ¯āĻŧ" + 7 | "āĻ¸āĻžāĻ¤" + 8 | "āĻ†āĻŸ" + 9 | "āĻ¨āĻ¯āĻŧ" + + 11 | "āĻāĻ—āĻžāĻ°ā§‹" + 12 | "āĻŦāĻžāĻ°ā§‹" + 13 | "āĻ¤ā§‡āĻ°ā§‹" + 14 | "āĻšā§ŒāĻĻā§āĻĻ" + 15 | "āĻĒāĻ¨ā§‡āĻ°ā§‹" + 16 | "āĻˇā§‹āĻ˛" + 17 | "āĻ¸āĻ¤ā§‡āĻ°ā§‹" + 18 | "āĻ†āĻ āĻžāĻ°ā§‹" + 19 | "āĻŠāĻ¨āĻŋ" + + 10 | "āĻĻāĻļ" + 20 | "āĻŦāĻŋāĻļ" + 30 | "āĻ¤ā§āĻ°āĻŋāĻļ" + 40 | "āĻšāĻ˛ā§āĻ˛āĻŋāĻļ" + 50 | "āĻĒāĻžā§āĻšāĻžāĻļ" + 60 | "āĻˇāĻžāĻŸ" + 70 | "āĻ¸āĻ¤ā§āĻ¤āĻ°" + 80 | "āĻ†āĻļāĻŋ" + 90 | "āĻ¨āĻŦā§āĻŦāĻ‡" + + 21 | "āĻāĻ•ā§āĻļ" + 37 | "āĻ¸āĻžāĻ¤āĻ¤ā§āĻ°āĻŋāĻļ" + 43 | "āĻ¤ā§‡āĻ¤āĻžāĻ˛ā§āĻ˛āĻŋāĻļ" + 58 | "āĻ†āĻŸāĻžāĻˇāĻŋ" + 69 | "āĻŠāĻ¨āĻˇāĻžāĻŸ" + 76 | "āĻ›āĻŋāĻ¯āĻŧāĻžāĻ¤ā§āĻ¤āĻ°" + 82 | "āĻŦāĻŋāĻ°āĻžāĻļāĻŋ" + 95 | "āĻĒāĻāĻšāĻžāĻ¨āĻŦā§āĻŦāĻ‡" + + 100 | "āĻāĻ•āĻļā§‹" + 200 | "āĻĻā§āĻ‡āĻļā§‹" + 300 | "āĻ¤āĻŋāĻ¨āĻļā§‹" + 400 | "āĻšāĻžāĻ°āĻļā§‹" + 500 | "āĻĒāĻžāĻāĻšāĻļā§‹" + 600 | "āĻ›āĻ¯āĻŧāĻļā§‹" + 700 | "āĻ¸āĻžāĻ¤āĻļā§‹" + 800 | "āĻ†āĻŸāĻļā§‹" + 900 | "āĻ¨āĻ¯āĻŧāĻļā§‹" + + 101 | "āĻāĻ•āĻļ āĻāĻ•" + 111 | "āĻāĻ•āĻļ āĻāĻ—āĻžāĻ°ā§‹" + 272 | "āĻĻā§āĻ‡ āĻļā§‹ āĻŦāĻžāĻšāĻžāĻ¤ā§āĻ¤āĻ°" + 387 | "āĻ¤āĻŋāĻ¨āĻļā§‹ āĻ¸āĻžāĻ¤āĻžāĻļāĻŋ" + 421 | "āĻšāĻžāĻ°āĻļā§‹ āĻāĻ•ā§āĻļ" + 448 | "āĻšāĻžāĻ°āĻļā§‹ āĻ†āĻŸāĻšāĻ˛ā§āĻ˛āĻŋāĻļ" + 569 | "āĻĒāĻžāĻāĻšāĻļā§‹ āĻŠāĻ¨āĻ¸āĻ¤ā§āĻ¤āĻ°" + 625 | "āĻ›ā§ŸāĻļā§‹ āĻĒāĻāĻšāĻŋāĻļ" + 782 | "āĻ¸āĻžāĻ¤ āĻļā§‹ āĻŦāĻŋāĻ°āĻžāĻļāĻŋ" + 895 | "āĻ†āĻŸ āĻļā§‹ āĻĒāĻāĻšāĻžāĻ¨āĻŦā§āĻŦāĻ‡" + 999 | "āĻ¨ā§Ÿ āĻļā§‹ āĻ¨āĻŋāĻ°āĻžāĻ¨āĻŦā§āĻŦāĻ‡" + + 1_000 | "āĻāĻ• āĻšāĻžāĻœāĻžāĻ°" + 2_000 | "āĻĻā§āĻ‡ āĻšāĻžāĻœāĻžāĻ°" + 3_000 | "āĻ¤āĻŋāĻ¨ āĻšāĻžāĻœāĻžāĻ°" + 4_000 | "āĻšāĻžāĻ° āĻšāĻžāĻœāĻžāĻ°" + 5_000 | "āĻĒāĻžāĻāĻš āĻšāĻžāĻœāĻžāĻ°" + 11_000 | "āĻāĻ—āĻžāĻ°ā§‹ āĻšāĻžāĻœāĻžāĻ°" + 12_000 | "āĻŦāĻžāĻ°ā§‹ āĻšāĻžāĻœāĻžāĻ°" + 13_000 | "āĻ¤ā§‡āĻ°ā§‹ āĻšāĻžāĻœāĻžāĻ°" + 14_000 | "āĻšā§ŒāĻĻā§āĻĻ āĻšāĻžāĻœāĻžāĻ°" + 15_000 | "āĻĒāĻ¨ā§‡āĻ° āĻšāĻžāĻœāĻžāĻ°" + 21_000 | "āĻāĻ•ā§āĻļ āĻšāĻžāĻœāĻžāĻ°" + + 7_634 | "āĻ¸āĻžāĻ¤ āĻšāĻžāĻœāĻžāĻ° āĻ›ā§Ÿ āĻļā§‹ āĻšā§ŒāĻ¤ā§āĻ°āĻŋāĻļ" + 24_190 | "āĻšāĻŦā§āĻŦāĻŋāĻļ āĻšāĻžāĻœāĻžāĻ° āĻāĻ• āĻļā§‹āĻ¨āĻŦā§āĻŦāĻ‡" + 99_999 | "āĻ¨āĻŋāĻ°āĻžāĻ¨āĻŦā§āĻŦāĻ‡ āĻšāĻžāĻœāĻžāĻ° āĻ¨ā§Ÿ āĻļā§‹ āĻ¨āĻŋāĻ°āĻžāĻ¨āĻŦā§āĻŦāĻ‡" + + 111_000 | "āĻāĻ• āĻ˛āĻžāĻ– āĻāĻ—āĻžāĻ°ā§‹ āĻšāĻžāĻœāĻžāĻ°" + 112_000 | "āĻāĻ• āĻ˛āĻžāĻ– āĻŦāĻžāĻ°ā§‹ āĻšāĻžāĻœāĻžāĻ°" + 113_000 | "āĻāĻ• āĻ˛āĻžāĻ– āĻ¤ā§‡āĻ°ā§‹ āĻšāĻžāĻœāĻžāĻ°" + 115_000 | "āĻāĻ• āĻ˛āĻžāĻ– āĻĒāĻ¨ā§‡āĻ°ā§‹ āĻšāĻžāĻœāĻžāĻ°" + 700_000 | "āĻ¸āĻžāĻ¤ āĻ˛āĻžāĻ–" + 653_000 | "āĻ›ā§Ÿ āĻ˛āĻžāĻ– āĻ¤āĻŋāĻĒā§āĻĒāĻžāĻ¨ā§āĻ¨ āĻšāĻžāĻœāĻžāĻ°" + + 123_454 | "āĻāĻ• āĻ˛āĻžāĻ– āĻ¤ā§‡āĻ‡āĻļ āĻšāĻžāĻœāĻžāĻ° āĻšāĻžāĻ° āĻļā§‹ āĻšā§āĻ¯āĻŧāĻžāĻ¨ā§āĻ¨" + 999_999 | "āĻ¨ā§Ÿ āĻ˛āĻžāĻ– āĻ¨āĻŋāĻ°āĻžāĻ¨āĻŦā§āĻŦāĻ‡ āĻšāĻžāĻœāĻžāĻ° āĻ¨ā§Ÿ āĻļā§‹ āĻ¨āĻŋāĻ°āĻžāĻ¨āĻŦā§āĻŦāĻ‡" + + 1_000_000 | "āĻāĻ• āĻŽāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + 2_000_000 | "āĻĻā§āĻ‡ āĻŽāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + 5_000_000 | "āĻĒāĻžāĻāĻš āĻŽāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + 11_437_219 | "āĻāĻ• āĻ•ā§‹āĻŸāĻŋ āĻšā§ŒāĻĻā§āĻĻ āĻ˛āĻžāĻ– āĻ¸āĻžāĻ‡āĻ¤ā§āĻ°āĻŋāĻļ āĻšāĻžāĻœāĻžāĻ° āĻĻā§āĻ‡ āĻļā§‹ āĻŠāĻ¨āĻŋāĻļ" + 21_437_219 | "āĻĻā§āĻ‡ āĻ•ā§‹āĻŸāĻŋ āĻšā§ŒāĻĻā§āĻĻ āĻ˛āĻžāĻ– āĻ¸āĻžāĻ‡āĻ¤ā§āĻ°āĻŋāĻļ āĻšāĻžāĻœāĻžāĻ° āĻĻā§āĻ‡ āĻļā§‹ āĻŠāĻ¨āĻŋāĻļ" + 22_437_219 | "āĻĻā§āĻ‡ āĻ•ā§‹āĻŸāĻŋ āĻšāĻŦā§āĻŦāĻŋāĻļ āĻ˛āĻžāĻ– āĻ¸āĻžāĻ‡āĻ¤ā§āĻ°āĻŋāĻļ āĻšāĻžāĻœāĻžāĻ° āĻĻā§āĻ‡ āĻļā§‹ āĻŠāĻ¨āĻŋāĻļ" + 23_437_219 | "āĻĻā§āĻ‡ āĻ•ā§‹āĻŸāĻŋ āĻšā§ŒāĻ¤ā§āĻ°āĻŋāĻļ āĻ˛āĻžāĻ– āĻ¸āĻžāĻ‡āĻ¤ā§āĻ°āĻŋāĻļ āĻšāĻžāĻœāĻžāĻ° āĻĻā§āĻ‡ āĻļā§‹ āĻŠāĻ¨āĻŋāĻļ" + 100_000_000 | "āĻĻāĻļ āĻ•ā§‹āĻŸāĻŋ" + 121_000_000 | "āĻŦāĻžāĻ°ā§‹ āĻ•ā§‹āĻŸāĻŋ āĻĻāĻļ āĻ˛āĻžāĻ–" + 121_451_789 | "āĻŦāĻžāĻ°ā§‹ āĻ•ā§‹āĻŸāĻŋ āĻšā§ŒāĻĻā§āĻĻ āĻ˛āĻžāĻ– āĻāĻ•āĻžāĻ¨ā§āĻ¨ āĻšāĻžāĻœāĻžāĻ° āĻ¸āĻžāĻ¤ āĻļā§‹ āĻŠāĻ¨āĻ¨āĻŦā§āĻŦāĻ‡" + 123_456_789 | "āĻŦāĻžāĻ°ā§‹ āĻ•ā§‹āĻŸāĻŋ āĻšā§ŒāĻ¤ā§āĻ°āĻŋāĻļ āĻ˛āĻžāĻ– āĻ›āĻžāĻĒā§āĻĒāĻžāĻ¨ā§āĻ¨ āĻšāĻžāĻœāĻžāĻ° āĻ¸āĻžāĻ¤ āĻļā§‹ āĻŠāĻ¨āĻ¨āĻŦā§āĻŦāĻ‡" + + 1_000_000_000 | "āĻāĻ• āĻŦāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + 2_141_123_731 | "āĻĻā§āĻ‡āĻļā§‹ āĻšā§ŒāĻĻā§āĻĻ āĻŦāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨ āĻāĻ—āĻžāĻ°ā§‹ āĻ˛āĻžāĻ– āĻ¤ā§‡āĻ‡āĻļ āĻšāĻžāĻœāĻžāĻ° āĻ¸āĻžāĻ¤ āĻļā§‹ āĻāĻ•āĻ¤ā§āĻ°āĻŋāĻļ" + Long.MAX_VALUE | "āĻĻā§āĻ‡ āĻŦāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨ āĻāĻ•āĻļ āĻ¸āĻžāĻ¤āĻšāĻ˛ā§āĻ˛āĻŋāĻļ āĻŽāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨ āĻšāĻžāĻ°āĻļāĻ¤ āĻ¤āĻŋāĻ°āĻŋāĻļ āĻšāĻžāĻœāĻžāĻ° āĻ›āĻ¯āĻŧāĻļ āĻ¸āĻžāĻ¤āĻšāĻ˛ā§āĻ˛āĻŋāĻļ" + } + + @Unroll + def "should convert long #value to '#words' in Bangla"() { + expect: + longConverter.asWords(value) == words + + where: + value | words + 5_000_000_000 | "āĻĒāĻžāĻāĻš āĻŦāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + + 1_000_000_000_000 | "āĻāĻ• āĻŸā§āĻ°āĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + 2_000_000_000_000 | "āĻĻā§āĻ‡ āĻŸā§āĻ°āĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + 5_000_000_000_000 | "āĻĒāĻžāĻāĻš āĻŸā§āĻ°āĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + + 1_000_000_000_000_000 | "āĻāĻ• āĻ•ā§‹āĻ¯āĻŧāĻžāĻĄā§āĻ°āĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + 2_000_000_000_000_000 | "āĻĻā§āĻ‡ āĻ•ā§‹āĻ¯āĻŧāĻžāĻĄā§āĻ°āĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + 5_000_000_000_000_000 | "āĻĒāĻžāĻāĻš āĻ•ā§‹āĻ¯āĻŧāĻžāĻĄā§āĻ°āĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨" + + 1_000_000_000_000_000_000 | "āĻĻāĻļ āĻ˛āĻ•ā§āĻˇā§‡āĻ° āĻĒāĻžā§āĻšāĻ˜āĻžāĻ¤" + 2_000_000_000_000_000_000 | "āĻŦāĻŋāĻļ āĻ˛āĻ•ā§āĻˇā§‡āĻ° āĻĒāĻžā§āĻšāĻ˜āĻžāĻ¤" + Long.MAX_VALUE | "āĻ¨āĻ¯āĻŧ āĻŸā§āĻ°āĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨ āĻĻā§āĻ‡āĻļāĻ¤ āĻ¤ā§‡āĻ‡āĻļ āĻŦāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨ āĻ¤āĻŋāĻ¨āĻļāĻ¤ āĻŦāĻžāĻšāĻžāĻ¤ā§āĻ¤āĻ° āĻŸā§āĻ°āĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨ āĻ›āĻ¤ā§āĻ°āĻŋāĻļ āĻŦāĻŋāĻ˛āĻŋāĻ¯āĻŧāĻ¨ āĻ†āĻŸāĻļāĻ¤ āĻĒāĻžā§āĻšāĻžāĻļ āĻšāĻžāĻ° āĻ•ā§‹āĻŸāĻŋ āĻ¸āĻžāĻ¤āĻļāĻ¤ āĻĒāĻāĻšāĻžāĻ¤ā§āĻ¤āĻ° āĻšāĻžāĻœāĻžāĻ° āĻ†āĻŸāĻļāĻ¤ āĻ¸āĻžāĻ¤" + } +} \ No newline at end of file