public void GivenErrorMessageIsntAlreadySet_ReturnsInterchangeExceptionMessage() { // Arrange var attribute = new DiagnoseaEmailAddressAttribute(); // Act var result = attribute.FormatErrorMessage("name"); // Assert Assert.That(result, Is.EqualTo(ExceptionMessages.Interchange.InvalidEmailAddress)); }
public void GivenErrorMessageIsAlreadySet_ReturnsAlreadySetErrorMessage() { // Arrange var attribute = new DiagnoseaEmailAddressAttribute { ErrorMessage = "This is an error message" }; // Act var result = attribute.FormatErrorMessage("name"); // Assert Assert.That(result, Is.EqualTo(attribute.ErrorMessage)); }