public void CanParseToInt32_CorrectNumber_True() { //arrange string line = Int32.MaxValue.ToString(); bool onlyPositive = false; //act bool result = BaseValidator.CanParseToInt32(line, onlyPositive); //assert Assert.True(result); }
public void CanParseToInt32_OnlyPositiveNegativeNumber_False() { //arrange string line = "-10"; bool onlyPositive = true; //act bool result = BaseValidator.CanParseToInt32(line, onlyPositive); //assert Assert.False(result); }
public void CanParseToInt32_TooBigNumber_False() { //arrange string line = (Int32.MaxValue).ToString() + "0"; bool onlyPositive = false; //act bool result = BaseValidator.CanParseToInt32(line, onlyPositive); //assert Assert.False(result); }
public void CanParseToInt32_Null_False() { //arrange string line = null; bool onlyPositive = false; //act bool result = BaseValidator.CanParseToInt32(line, onlyPositive); //assert Assert.False(result); }