コード例 #1
0
        public void TestPasswordChangeConfirmationNotification()
        {
            _smtpClientMock.Setup(s => s.Send(It.IsAny <MailMessage>())).Callback <MailMessage>(
                m =>
            {
                Assert.AreEqual("*****@*****.**", m.To[0].Address);
                Assert.AreEqual("Project C.U.R.E - Password change confirmation", m.Subject);
                Assert.IsTrue(m.Body.Contains("Dear Test User"));
            });
            var testEmailer = new EmailNotifier(_smtpClientMock.Object);

            testEmailer.PasswordChangeConfirmationNotification(_repositoryMock.Object, "*****@*****.**");
        }