public void ShouldNotSendEmailEmailIsNotValid() { try { service.Register("totoemail.com", "toto"); } catch (ValidationException e) {} Assert.False(SmtpClient.MailIsSent()); }
public void ShouldSendEmailWhenEmailIsValid() { service.Register("*****@*****.**", "toto"); Assert.That(SmtpClient.MailIsSent()); }
public void SetUp() { service = new UserService(); Database.UserIsSaved(false); SmtpClient.MailIsSent(false); }