예제 #1
0
 public static void FromDecimalStringNullOrEmpty()
 {
     Assert.Throws <ArgumentNullException>(()
                                           => IntegerConverter.FromDecimalString(null));
     Assert.Throws <ArgumentOutOfRangeException>(()
                                                 => IntegerConverter.FromDecimalString(""));
 }
예제 #2
0
        public LargeInteger(string decimalNumber)
        {
            if (decimalNumber[0] == '-')
            {
                throw new Exception("Cannot contain negative numbers");
            }

            value = IntegerConverter.FromDecimalString(decimalNumber);
        }
예제 #3
0
        public void FromDecimalString(string value, Integer expected)
        {
            var actual = IntegerConverter.FromDecimalString(value);

            Assert.Equal(expected, actual);
        }