File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Nager.Country.UnitTest Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,12 @@ public void CheckCurrencyIntegrityTest()
5353 [ TestMethod ]
5454 public void CompareCurrencyInfoWithNetFrameworkTest ( )
5555 {
56+ //Compare with https://en.wikipedia.org/wiki/Currency_symbol
57+
5658 var currenies = this . GetCurrencies ( ) ;
5759
5860 var frameworkCurrencies = CultureInfo . GetCultures ( CultureTypes . SpecificCultures )
59- . Select ( ci => ci . LCID ) . Distinct ( )
61+ . Select ( ci => ci . Name ) . Distinct ( )
6062 . Select ( id => new RegionInfo ( id ) )
6163 . GroupBy ( r => r . ISOCurrencySymbol )
6264 . Select ( g => g . ToList ( ) )
@@ -68,6 +70,8 @@ public void CompareCurrencyInfoWithNetFrameworkTest()
6870 r . First ( ) . CurrencySymbol ,
6971 } ) . ToList ( ) ;
7072
73+ var counter = 0 ;
74+
7175 foreach ( var frameworkCurrency in frameworkCurrencies )
7276 {
7377 var currency = currenies . SingleOrDefault ( curreny => curreny . IsoCode == frameworkCurrency . ISOCurrencySymbol ) ;
@@ -78,9 +82,12 @@ public void CompareCurrencyInfoWithNetFrameworkTest()
7882
7983 if ( currency . Symbol != frameworkCurrency . CurrencySymbol )
8084 {
85+ counter ++ ;
8186 Trace . WriteLine ( $ "Detect currency distinction IsoCode:{ currency . IsoCode } Symbol:{ currency . Symbol } .net framework symbol:{ frameworkCurrency . CurrencySymbol } ") ;
8287 }
8388 }
89+
90+ Trace . WriteLine ( $ "Found { counter } distinctions") ;
8491 }
8592 }
8693}
You can’t perform that action at this time.
0 commit comments