public void NumberValidator_WhenNumeric_IsValid() { const string INPUT = "1"; const bool EXPECTED_RESULT = true; bool result = _validator.IsValid(INPUT); Assert.AreEqual(EXPECTED_RESULT, result); }
public void IsNumber_WithLettersFails() { var numVal = new NumberValidator(); var result = numVal.IsValid("1a234.12", "Temp"); Assert.IsFalse(result); }
public void IsNumber_WithIntegerWorks() { var numVal = new NumberValidator(); var result = numVal.IsValid("123", "Temp"); Assert.IsTrue(result); }
public void IsNumber_WithDecimalWorks() { var numVal = new NumberValidator(); var result = numVal.IsValid("1234.12", "Temp"); Assert.IsTrue(result); }
public void Valid_Number_Should_Return_IsValid_True() { var validator = new NumberValidator(); var result = validator.IsValid("345882865"); Assert.True(result); }
public void IsValid_Wrong_Data_AssertFalse() { NumberValidator val = new NumberValidator(); Assert.False(val.IsValid("0s7294835a7")); }
public void IsValid_Correct_Data_AssertTrue() { NumberValidator val = new NumberValidator(); Assert.True(val.IsValid("0172-9483597")); }
public void IsValid_Wrong_Data_AssertFalse() { NumberValidator val = new NumberValidator(); Assert.False(val.IsValid("rm.matis.com")); }
public void Short_Number_Should_Return_IsValid_False() { var validator = new NumberValidator(); Assert.False(validator.IsValid("3458")); }
public void IsValid_HappyPath_ReturnTrue(string number) { var isAValidNumber = _sut.IsValid(number); Assert.IsTrue(isAValidNumber); }