public void ConvertToReturnsCorrectConversion() { var prefix = new Prefix(1000m); Assert.AreEqual(1.5m, prefix.ConvertTo(1500)); prefix = new Prefix(0.001m); Assert.AreEqual(1500m, prefix.ConvertTo(1.5m)); }
/// <summary> /// Converts a value from non-prefixed representation to prefixed representation. /// </summary> /// <param name="value">The value to convert to prefixed representation.</param> /// <param name="prefix">The prefix to use with the value.</param> /// <returns>The prefixed representation.</returns> public static decimal ConvertTo(Prefix prefix, decimal value) { return(prefix.ConvertTo(value)); }