コード例 #1
0
        public void CanParseToDouble_CorrectNumber_True()
        {
            //arrange
            string line         = Double.MaxValue.ToString();
            bool   onlyPositive = false;

            //act
            bool result = BaseValidator.CanParseToDouble(line, onlyPositive);

            //assert
            Assert.True(result);
        }
コード例 #2
0
        public void CanParseToDouble_OnlyPositiveNegativeNumber_False()
        {
            //arrange
            string line         = "-10";
            bool   onlyPositive = true;

            //act
            bool result = BaseValidator.CanParseToDouble(line, onlyPositive);

            //assert
            Assert.False(result);
        }
コード例 #3
0
        public void CanParseToDouble_TooBigNumber_False()
        {
            //arrange
            string line         = (Double.MaxValue).ToString() + "0";
            bool   onlyPositive = false;

            //act
            bool result = BaseValidator.CanParseToDouble(line, onlyPositive);

            //assert
            Assert.False(result);
        }
コード例 #4
0
        public void CanParseToDouble_Null_False()
        {
            //arrange
            string line         = null;
            bool   onlyPositive = false;

            //act
            bool result = BaseValidator.CanParseToDouble(line, onlyPositive);

            //assert
            Assert.False(result);
        }