Beispiel #1
0
        public async Task <string> GenerateConfirmSmsText(SmsConfirmationData confirmationDataData)
        {
            var templateVm = new SmsConfirmationTemplate
            {
                ConfirmationCode = confirmationDataData.ConfirmationCode
            };

            return(await _templateGenerator.GenerateAsync("SmsConfirmation", templateVm, TemplateType.Sms));
        }
Beispiel #2
0
        public void SmsSentUsesUtc()
        {
            var now = DateTime.Now;
            var smsConfirmationData = new SmsConfirmationData("receipt", now, 2m);

            Assert.That(smsConfirmationData.SentAtUtc.Hour, Is.EqualTo(now.Hour));
            Assert.That(smsConfirmationData.SentAtUtc.Minute, Is.EqualTo(now.Minute));
            Assert.That(smsConfirmationData.SentAtUtc.Second, Is.EqualTo(now.Second));
            Assert.That(smsConfirmationData.SentAtUtc.Kind, Is.Not.EqualTo(now.Kind));
            Assert.That(smsConfirmationData.SentAtUtc.Kind, Is.EqualTo(DateTimeKind.Utc));
        }