public void ParseNegativeStringToInt_Success() { var strNumber = "-1000"; var result = ParseNumber.Parse(strNumber); Assert.AreEqual(-1000, result); }
public void ParseStringToInt_Success() { var strNumber = "1234"; var result = ParseNumber.Parse(strNumber); Assert.AreEqual(1234, result); }
static void Main(string[] args) { while (true) { string a = Console.ReadLine(); Console.WriteLine(ParseNumber.Parse(a)); } //string a = "(54)"; //out int b = 0; //Int32.TryParse(a,b); }
public void ThrowOverflowExceptionBound() { ParseNumber.Parse("2147483648"); }
public void ThrowFormatException() { ParseNumber.Parse("1b1"); }
public void ThrowOverflowException() { ParseNumber.Parse("111111111111111111111"); }
public void ThrowIfCannotParse() { ParseNumber.Parse(null); }