Exemple #1
0
        public void ShoudSendEmail()
        {
            var request = new EmailRequest
            {
                ToEmail     = TestToEmail,
                Tokens      = TokenGenerator.CreateActivationEmailTokens(),
                MessageType = MessageTypes.SendActivationCode
            };

            _dispatcher.SendEmail(request);

            _logServiceMock.Verify(l => l.Error(It.IsAny <string>(), It.IsAny <Exception>()), Times.Never);
        }
Exemple #2
0
        public void ShoudSendEmailWithSubjectInTemplate()
        {
            // NOTE: Subject is not set and is defined in SendGrid email template.
            var request = new EmailRequest
            {
                ToEmail     = TestToEmail,
                Tokens      = TokenGenerator.CreateActivationEmailTokens(),
                MessageType = MessageTypes.SendActivationCode
            };

            _dispatcher.SendEmail(request);

            _logServiceMock.Verify(l => l.Error(It.IsAny <string>(), It.IsAny <Exception>()), Times.Never);
        }