public void IsNumericStringInvalidInputReturnFalse() { string[] testCases = new string[] { "123a", "!", "x", "1>1", "0|", "8654q73", "[]", "+", "-", "=" }; foreach (string text in testCases) { Assert.IsFalse(StringFunction.IsNumeric(text)); } }
public void IsNumericStringValidInputReturnTrue() { string[] testCases = new string[] { "123", "7", "999", "11", "0", "865473" }; foreach (string text in testCases) { Assert.IsTrue(StringFunction.IsNumeric(text)); } }