public void Parse_Null_ReturnNull() { // Arrange var mapper = new EmailMapper(); // Act var email = mapper.Parse(null); // Assert email.Should().BeNull(); }
public void Parse_InvalidEmail_ThrowException() { // Arrange var emailAddress = "invalid_email"; var mapper = new EmailMapper(); // Act Action action = () => mapper.Parse(emailAddress); // Assert action.Should().Throw <ValidationException>(); }
public void Parse_ValidEmail_ReturnParsedEmail() { // Arrange var emailAddress = "*****@*****.**"; var mapper = new EmailMapper(); // Act var email = mapper.Parse(emailAddress); // Assert email.ToString().Should().Be(emailAddress); }