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); }
public void CanParseToDouble_OnlyPositiveNegativeNumber_False() { //arrange string line = "-10"; bool onlyPositive = true; //act bool result = BaseValidator.CanParseToDouble(line, onlyPositive); //assert Assert.False(result); }
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); }
public void CanParseToDouble_Null_False() { //arrange string line = null; bool onlyPositive = false; //act bool result = BaseValidator.CanParseToDouble(line, onlyPositive); //assert Assert.False(result); }