public void AINValueValidatorFailAlphanumeric() { string expectedInputId = "555A44555"; AINValueValidator validator = new AINValueValidator(); string actualAcceptedInputId = null; bool isValid = validator.Validate(expectedInputId, out actualAcceptedInputId); Assert.IsFalse(isValid, "The validator should have reported this input as invalid!"); Assert.IsNull(actualAcceptedInputId, "The accepted input id should be null!"); }
public void AINValueValidatorDashFailTooManyDigits() { string expectedInputId = "555-444-555-555"; AINValueValidator validator = new AINValueValidator(); string actualAcceptedInputId = null; bool isValid = validator.Validate(expectedInputId, out actualAcceptedInputId); Assert.IsFalse(isValid, "The validator should have reported this input as invalid!"); Assert.IsNull(actualAcceptedInputId, "The accepted input id should be null!"); }
public void AINValueValidatorSuccess() { string expectedInputId = "555444555"; AINValueValidator validator = new AINValueValidator(); string actualAcceptedInputId = null; bool isValid = validator.Validate(expectedInputId, out actualAcceptedInputId); Assert.IsTrue(isValid, "The validator should have reported this input as valid!"); Assert.IsNotNull(actualAcceptedInputId, "The accepted input id should not be null!"); Assert.AreEqual(expectedInputId, actualAcceptedInputId, $"Unexpected accepted input id ('{expectedInputId}' != '{actualAcceptedInputId}')"); }