public void ToString_Format_Exception(string format, string provider) { if (provider != null) { formatProvider = new CultureInfo(provider); } CustomFormatProvider customFormatProvider = new CustomFormatProvider(formatProvider); Assert.That(() => customFormatProvider.Format(format, customer, formatProvider), Throws.TypeOf <FormatException>()); }
public string ToString_Format_CustomerFormatProvider(string format, string provider) { if (provider != null) { formatProvider = new CultureInfo(provider); } CustomFormatProvider customFormatProvider = new CustomFormatProvider(formatProvider); return(customFormatProvider.Format(format, customer, formatProvider)); }