예제 #1
0
        public void ShouldNotSendEmailEmailIsNotValid()
        {
            try {
                service.Register("totoemail.com", "toto");
            } catch (ValidationException e) {}

            Assert.False(SmtpClient.MailIsSent());
        }
예제 #2
0
 public void ShouldSendEmailWhenEmailIsValid()
 {
     service.Register("*****@*****.**", "toto");
     Assert.That(SmtpClient.MailIsSent());
 }
예제 #3
0
 public void SetUp()
 {
     service = new UserService();
     Database.UserIsSaved(false);
     SmtpClient.MailIsSent(false);
 }