@@ -23,27 +23,39 @@ public void Apply_NoCurrency_ReturnsInput(string input, string expected)
2323 // NOTE: Expectations updated for default Humanizer output (includes "and")
2424 [ TestMethod ]
2525 // Symbol First
26- [ DataRow ( "$1" , " one dollar " , DisplayName = "USD Simple ($)" ) ]
27- [ DataRow ( "$1.00" , " one dollar " , DisplayName = "USD Simple zero cents ($)" ) ]
28- [ DataRow ( "$1.50" , " one dollar fifty cents " , DisplayName = "USD with Cents ($)" ) ] // No "and" for cents usually
29- [ DataRow ( "$1,234.56" , " one thousand two hundred and thirty-four dollars fifty-six cents " , DisplayName = "USD Large with Cents ($)" ) ]
30- [ DataRow ( "£10" , " ten pounds " , DisplayName = "GBP Simple (£)" ) ]
31- [ DataRow ( "£0.50" , " zero pounds fifty pence " , DisplayName = "GBP Only Pence (£)" ) ]
26+ [ DataRow ( "$1" , " one US dollar " , DisplayName = "USD Simple ($)" ) ]
27+ [ DataRow ( "$1.00" , " one US dollar " , DisplayName = "USD Simple zero cents ($)" ) ]
28+ [ DataRow ( "$1.50" , " one US dollar fifty cents " , DisplayName = "USD with Cents ($)" ) ] // No "and" for cents usually
29+ [ DataRow ( "$1,234.56" , " one thousand two hundred and thirty-four US dollars fifty-six cents " , DisplayName = "USD Large with Cents ($)" ) ]
30+ [ DataRow ( "£10" , " ten British pounds " , DisplayName = "GBP Simple (£)" ) ]
31+ [ DataRow ( "£0.50" , " zero British pounds fifty pence " , DisplayName = "GBP Only Pence (£)" ) ]
3232 [ DataRow ( "€100" , " one hundred euros " , DisplayName = "EUR Simple (€)" ) ]
3333 [ DataRow ( "€1.25" , " one euro twenty-five cents " , DisplayName = "EUR With Cents (€)" ) ]
34- [ DataRow ( "¥500" , " five hundred yen " , DisplayName = "JPY Simple (¥)" ) ]
34+ [ DataRow ( "¥500" , " five hundred Japanese yen " , DisplayName = "JPY Simple (¥)" ) ]
3535 // Code Last
36- [ DataRow ( "1 USD" , " one dollar " , DisplayName = "USD Code Simple" ) ]
37- [ DataRow ( "1.00 USD" , " one dollar " , DisplayName = "USD Code zero cents" ) ]
38- [ DataRow ( "1.50 USD" , " one dollar fifty cents " , DisplayName = "USD Code with Cents" ) ]
39- [ DataRow ( "1,234.56 USD" , " one thousand two hundred and thirty-four dollars fifty-six cents " , DisplayName = "USD Code Large" ) ]
40- [ DataRow ( "10 GBP" , " ten pounds " , DisplayName = "GBP Code Simple" ) ] // Uses "pound" from map
41- [ DataRow ( "0.50 GBP" , " zero pounds fifty pence " , DisplayName = "GBP Code Only Pence" ) ]
36+ [ DataRow ( "1 USD" , " one US dollar " , DisplayName = "USD Code Simple" ) ]
37+ [ DataRow ( "1.00 USD" , " one US dollar " , DisplayName = "USD Code zero cents" ) ]
38+ [ DataRow ( "1.50 USD" , " one US dollar fifty cents " , DisplayName = "USD Code with Cents" ) ]
39+ [ DataRow ( "1,234.56 USD" , " one thousand two hundred and thirty-four US dollars fifty-six cents " , DisplayName = "USD Code Large" ) ]
40+ [ DataRow ( "10 GBP" , " ten British pounds " , DisplayName = "GBP Code Simple" ) ] // Uses "pound" from map
41+ [ DataRow ( "0.50 GBP" , " zero British pounds fifty pence " , DisplayName = "GBP Code Only Pence" ) ]
4242 [ DataRow ( "100 EUR" , " one hundred euros " , DisplayName = "EUR Code Simple" ) ]
4343 [ DataRow ( "1.25 EUR" , " one euro twenty-five cents " , DisplayName = "EUR Code With Cents" ) ]
44- [ DataRow ( "500 JPY" , " five hundred yen " , DisplayName = "JPY Code Simple" ) ] // Uses "yen" from map
44+ [ DataRow ( "500 JPY" , " five hundred Japanese yen " , DisplayName = "JPY Code Simple" ) ] // Uses "yen" from map
4545 [ DataRow ( "100 CAD" , " one hundred Canadian dollars " , DisplayName = "CAD Code Example" ) ]
46- [ DataRow ( "10 BRL" , " ten reais " , DisplayName = "BRL Code Example" ) ]
46+ [ DataRow ( "10 BRL" , " ten Brazilian reais " , DisplayName = "BRL Code Example" ) ]
47+ // Combined
48+ [ DataRow ( "$10 USD" , " ten US dollars " , DisplayName = "USD Combined ($)" ) ]
49+ [ DataRow ( "$10USD" , " ten US dollars " , DisplayName = "USD Combined (wihtout spaces)" ) ]
50+ [ DataRow ( "$10MXN" , " ten Mexican pesos " , DisplayName = "MXN Combined (without spaces)" ) ]
51+ [ DataRow ( "$10 CAD" , " ten Canadian dollars " , DisplayName = "CAD Combined ($)" ) ]
52+ [ DataRow ( "£10 GBP" , " ten British pounds " , DisplayName = "GBP Combined (£)" ) ]
53+ [ DataRow ( "€100 EUR" , " one hundred euros " , DisplayName = "EUR Combined (€)" ) ]
54+ [ DataRow ( "¥500 JPY" , " five hundred Japanese yen " , DisplayName = "JPY Combined (¥)" ) ]
55+ [ DataRow ( "10 USD $" , " ten US dollars $" , DisplayName = "USD Combined with Trailing Symbol" ) ]
56+ [ DataRow ( "10 GBP £" , " ten British pounds £" , DisplayName = "GBP Combined with Trailing Symbol" ) ]
57+ [ DataRow ( "100 EUR €" , " one hundred euros €" , DisplayName = "EUR Combined with Trailing Symbol" ) ]
58+ [ DataRow ( "500 JPY ¥" , " five hundred Japanese yen ¥" , DisplayName = "JPY Combined with Trailing Symbol" ) ]
4759 public void Apply_KnownCurrencies_ReplacesWithSpokenForm ( string input , string expected )
4860 {
4961 // Act
@@ -54,9 +66,10 @@ public void Apply_KnownCurrencies_ReplacesWithSpokenForm(string input, string ex
5466 }
5567
5668 [ TestMethod ]
57- [ DataRow ( "Send $10 now" , "Send ten dollars now" , DisplayName = "Currency within sentence" ) ]
69+ [ DataRow ( "Send $10 now" , "Send ten US dollars now" , DisplayName = "Currency within sentence" ) ]
5870 [ DataRow ( "It costs 50 EUR." , "It costs fifty euros ." , DisplayName = "Currency at end of sentence" ) ]
59- [ DataRow ( "$5 and £10" , " five dollars and ten pounds " , DisplayName = "Multiple different currencies" ) ]
71+ [ DataRow ( "It costs 50 EUR now." , "It costs fifty euros now." , DisplayName = "Currency within sentence" ) ]
72+ [ DataRow ( "$5 and £10" , " five US dollars and ten British pounds " , DisplayName = "Multiple different currencies" ) ]
6073 public void Apply_CurrencyInContext_ReplacesCorrectly ( string input , string expected )
6174 {
6275 // Act
@@ -69,7 +82,6 @@ public void Apply_CurrencyInContext_ReplacesCorrectly(string input, string expec
6982 [ TestMethod ]
7083 [ DataRow ( "10XYZ" , "10XYZ" , DisplayName = "Unknown Code XYZ" ) ]
7184 [ DataRow ( "¤10" , "¤10" , DisplayName = "Generic Currency Symbol" ) ]
72- [ DataRow ( "$10MXN" , "$10MXN" , DisplayName = "Symbol and Code" ) ]
7385 public void Apply_UnknownOrAmbiguousCurrency_NoChange ( string input , string expected )
7486 {
7587 // Act
0 commit comments