import
org.apache.commons.lang.math.NumberUtils;
import
org.apache.commons.lang.StringUtils;
assertFalse(StringUtils.isNumeric(
null
));
assertTrue (StringUtils.isNumeric(
""
));
assertFalse(StringUtils.isNumeric(
" "
));
assertTrue (StringUtils.isNumeric(
"0"
));
assertTrue (StringUtils.isNumeric(
"123"
));
assertFalse(StringUtils.isNumeric(
"12 3"
));
assertFalse(StringUtils.isNumeric(
"ab2c"
));
assertFalse(StringUtils.isNumeric(
"12-3"
));
assertFalse(StringUtils.isNumeric(
"12.3"
));
assertFalse(StringUtils.isNumeric(
"-123"
));
assertFalse(StringUtils.isNumeric(
"+123"
));
assertFalse(NumberUtils.isDigits(
null
));
assertFalse(NumberUtils.isDigits(
""
));
assertFalse(NumberUtils.isDigits(
" "
));
assertTrue (NumberUtils.isDigits(
"0"
));
assertTrue (NumberUtils.isDigits(
"123"
));
assertFalse(NumberUtils.isDigits(
"12 3"
));
assertFalse(NumberUtils.isDigits(
"ab2c"
));
assertFalse(NumberUtils.isDigits(
"12-3"
));
assertFalse(NumberUtils.isDigits(
"12.3"
));
assertFalse(NumberUtils.isDigits(
"-123"
));
assertFalse(NumberUtils.isDigits(
"+123"
));
assertFalse(NumberUtils.isNumber(
null
));
assertFalse(NumberUtils.isNumber(
""
));
assertFalse(NumberUtils.isNumber(
" "
));
assertTrue (NumberUtils.isNumber(
"0"
));
assertTrue (NumberUtils.isNumber(
"123"
));
assertFalse(NumberUtils.isNumber(
"12 3"
));
assertFalse(NumberUtils.isNumber(
"ab2c"
));
assertFalse(NumberUtils.isNumber(
"12-3"
));
assertTrue (NumberUtils.isNumber(
"12.3"
));
assertTrue (NumberUtils.isNumber(
"-123"
));
assertFalse(NumberUtils.isNumber(
"+123"
));