File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,18 @@ public void AllUnitsImplementToStringForRussian()
183
183
}
184
184
}
185
185
186
+ [ Test ]
187
+ public void GetDefaultAbbreviationFallsBackToDefaultStringIfNotSpecified ( )
188
+ {
189
+ UnitSystem usUnits = UnitSystem . GetCached ( CultureInfo . GetCultureInfo ( "en-US" ) ) ;
190
+
191
+ // Act
192
+ string abbreviation = usUnits . GetDefaultAbbreviation ( CustomUnit . Unit1 ) ;
193
+
194
+ // Assert
195
+ Assert . AreEqual ( "(no abbreviation for CustomUnit.Unit1)" , abbreviation ) ;
196
+ }
197
+
186
198
[ Test ]
187
199
public void GetDefaultAbbreviationFallsBackToUsEnglishCulture ( )
188
200
{
@@ -202,6 +214,7 @@ public void GetDefaultAbbreviationFallsBackToUsEnglishCulture()
202
214
Assert . AreEqual ( "US english abbreviation for Unit1" , abbreviation ) ;
203
215
}
204
216
217
+
205
218
[ Test ]
206
219
public void ToStringRoundsToTwoDecimals ( )
207
220
{
You can’t perform that action at this time.
0 commit comments