private void Test( string result, AbbreviatedNumberForm form, double value) { var str = AbbreviatedNumber.Format(form, value, Precision); str = str.Replace((char)160, ' '); Assert.IsTrue(result == str); }
private void Process(double value, Label abbreviated, Label original) { string template; if (Form == AbbreviatedNumberForm.Currency) { template = Properties.Resources.CurrencySample; } else { template = Properties.Resources.NumberSample; } abbreviated.Text = String.Format(template, AbbreviatedNumber.Format(Form, value, Precision)); original.Text = String.Format(template, Convert.ToUInt64(value).ToString()); }