public static void FromDecimalStringNullOrEmpty() { Assert.Throws <ArgumentNullException>(() => IntegerConverter.FromDecimalString(null)); Assert.Throws <ArgumentOutOfRangeException>(() => IntegerConverter.FromDecimalString("")); }
public LargeInteger(string decimalNumber) { if (decimalNumber[0] == '-') { throw new Exception("Cannot contain negative numbers"); } value = IntegerConverter.FromDecimalString(decimalNumber); }
public void FromDecimalString(string value, Integer expected) { var actual = IntegerConverter.FromDecimalString(value); Assert.Equal(expected, actual); }