public void TwoDecimalPlaceConverterRoundsToTwoDecimals() { TwoDecimalPlaceConverter converter = new TwoDecimalPlaceConverter(); object value = converter.Convert(123.45678M, typeof(decimal), 2, null); Assert.AreEqual <decimal>(123.46M, Convert.ToDecimal(value)); }
public void OnlyAcceptsIntegerNumDigitsArgument() { TwoDecimalPlaceConverter converter = new TwoDecimalPlaceConverter(); converter.Convert(123.4467M, null, "foo", null); }
public void OnlyAcceptsDecimalValueArgument() { TwoDecimalPlaceConverter converter = new TwoDecimalPlaceConverter(); converter.Convert("hello", null, 2, null); }