public SmsTrackingData(MessageFailedSending message)
 {
     Status = MessageTrackedStatus.Failed;
     SmsFailureData = message.SmsFailed;
     CorrelationId = message.CorrelationId;
     SmsData = message.SmsData;
     SmsMetaData = message.SmsMetaData;
     ConfirmationEmailAddress = message.ConfirmationEmailAddress;
 }
        public void ScheduleSmsForSendingLaterButFails()
        {
            var scheduleSmsForSendingLater = new ScheduleSmsForSendingLater { SendMessageAtUtc = DateTime.Now.AddDays(1), ScheduleMessageId = Guid.NewGuid()};
            var sagaId = Guid.NewGuid();
            var messageFailed = new MessageFailedSending { SmsData = new SmsData("1", "2"), SmsFailed = new SmsFailed(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty) };

            var scheduledSmsData = new ScheduledSmsData
            {
                Id = sagaId,
                Originator = "place",
                OriginalMessageId = Guid.NewGuid().ToString(),
                OriginalMessage = new ScheduleSmsForSendingLater { SmsData = new SmsData("1", "msg"), SmsMetaData = new SmsMetaData() }
            };

            Test.Initialize();
            Test.Saga<ScheduleSms>()
                .WithExternalDependencies(a => { a.Data = scheduledSmsData; })
                    .ExpectTimeoutToBeSetAt<ScheduleSmsTimeout>((state, timeout) => timeout == scheduleSmsForSendingLater.SendMessageAtUtc)
                .When(s => s.Handle(scheduleSmsForSendingLater))
                    .ExpectSend<SendOneMessageNow>()
                .WhenSagaTimesOut()
                    .ExpectPublish<ScheduledSmsFailed>()
                    .ExpectSendLocal<ScheduleFailed>()
                .When(s => s.Handle(messageFailed))
                    .AssertSagaCompletionIs(true);
        }