Пример #1
0
        public void WhenLargeIntegerIsPassedThenItShouldConvertIntoBigInteger()
        {
            var parser   = new BigNumberParser();
            var actual   = parser.Parse("12345678987655554443322234");
            var expected = BigInteger.Parse("12345678987655554443322234");

            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        public void WhenEmptyValueIsParsedThenItShouldNullException()
        {
            var parser = new BigNumberParser();

            parser.Parse(string.Empty);
        }
Пример #3
0
        public void WhenADecimalNumberIsPassedThenDecimalNumberNotAllowedExceptionThrown()
        {
            var parser = new BigNumberParser();

            parser.Parse("5.6666666");
        }
Пример #4
0
        public void WhenNullValueIsParsedThenItShouldNullException()
        {
            var parser = new BigNumberParser();

            parser.Parse(null);
        }