Пример #1
0
        public void Register(string email, string password)
        {
            if (!email.Contains("@"))
                throw new Exception("Email is not an email!");

            var user = new User(email, password);
            var db = new FakeDatabase();
            db.Save(user);

            var smtpClient = new FakeSmtpClient();
            smtpClient.Send(new MailMessage("*****@*****.**", email) { Subject = "Hello fool!" });
        }