@@ -283,10 +283,11 @@ public void GetDefaultAbbreviationFallsBackToUsEnglishCulture()
283
283
var zuluCulture = new CultureInfo ( "zu-ZA" ) ;
284
284
CultureInfo . CurrentCulture = CultureInfo . CurrentUICulture = zuluCulture ;
285
285
286
- UnitAbbreviationsCache . Default . MapUnitToAbbreviation ( CustomUnit . Unit1 , AmericanCulture , "US english abbreviation for Unit1" ) ;
286
+ var abbreviationsCache = new UnitAbbreviationsCache ( ) ;
287
+ abbreviationsCache . MapUnitToAbbreviation ( CustomUnit . Unit1 , AmericanCulture , "US english abbreviation for Unit1" ) ;
287
288
288
289
// Act
289
- string abbreviation = UnitAbbreviationsCache . Default . GetDefaultAbbreviation ( CustomUnit . Unit1 , zuluCulture ) ;
290
+ string abbreviation = abbreviationsCache . GetDefaultAbbreviation ( CustomUnit . Unit1 , zuluCulture ) ;
290
291
291
292
// Assert
292
293
Assert . Equal ( "US english abbreviation for Unit1" , abbreviation ) ;
@@ -301,9 +302,10 @@ public void GetDefaultAbbreviationFallsBackToUsEnglishCulture()
301
302
[ Fact ]
302
303
public void MapUnitToAbbreviation_AddCustomUnit_DoesNotOverrideDefaultAbbreviationForAlreadyMappedUnits ( )
303
304
{
304
- UnitAbbreviationsCache . Default . MapUnitToAbbreviation ( AreaUnit . SquareMeter , AmericanCulture , "m^2" ) ;
305
+ var cache = new UnitAbbreviationsCache ( ) ;
306
+ cache . MapUnitToAbbreviation ( AreaUnit . SquareMeter , AmericanCulture , "m^2" ) ;
305
307
306
- Assert . Equal ( "m²" , UnitAbbreviationsCache . Default . GetDefaultAbbreviation ( AreaUnit . SquareMeter ) ) ;
308
+ Assert . Equal ( "m²" , cache . GetDefaultAbbreviation ( AreaUnit . SquareMeter ) ) ;
307
309
}
308
310
309
311
/// <summary>
0 commit comments