Example #1
0
        public void ShouldSendPasswordResetConfirmationSms()
        {
            var request = new SmsRequest
            {
                ToNumber    = TestToNumber,
                Tokens      = TokenGenerator.CreatePasswordResetConfirmationTokens(),
                MessageType = MessageTypes.PasswordChanged
            };

            _dispatcher.SendSms(request);
        }
Example #2
0
        public void ShouldGetExceptionIfSomethingHappens()
        {
            var request = new SmsRequest
            {
                ToNumber    = InvalidTestToNumber,
                Tokens      = TokenGenerator.CreatePasswordResetConfirmationTokens(),
                MessageType = MessageTypes.PasswordChanged
            };

            _dispatcher.SendSms(request);
        }
Example #3
0
        public void ShouldSendPasswordResetConfirmationEmail()
        {
            var request = new EmailRequest
            {
                ToEmail     = TestToEmail,
                Tokens      = TokenGenerator.CreatePasswordResetConfirmationTokens(),
                MessageType = MessageTypes.PasswordChanged
            };

            _dispatcher.SendEmail(request);

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