/// <summary>
        /// Marks the message as delivered.
        /// </summary>
        /// <param name="providerStatus">The provider status.</param>
        /// <param name="failedDateTime">The failed date time.</param>
        public void MarkMessageAsDelivered(String providerStatus,
                                           DateTime failedDateTime)
        {
            this.CheckMessageCanBeSetToDelivered();

            SMSMessageDeliveredEvent messageDeliveredEvent = new SMSMessageDeliveredEvent(this.AggregateId, providerStatus, failedDateTime);

            this.ApplyAndAppend(messageDeliveredEvent);
        }
        public void SMSMessageDeliveredEvent_CanBeCreated_IsCreated()
        {
            SMSMessageDeliveredEvent messageDeliveredEvent =
                new SMSMessageDeliveredEvent(TestData.MessageId, TestData.ProviderStatusDescription, TestData.DeliveredDateTime);

            messageDeliveredEvent.ShouldNotBeNull();
            messageDeliveredEvent.AggregateId.ShouldBe(TestData.MessageId);
            messageDeliveredEvent.EventId.ShouldNotBe(Guid.Empty);
            messageDeliveredEvent.MessageId.ShouldBe(TestData.MessageId);
            messageDeliveredEvent.ProviderStatus.ShouldBe(TestData.ProviderStatusDescription);
            messageDeliveredEvent.DeliveredDateTime.ShouldBe(TestData.DeliveredDateTime);
        }
 /// <summary>
 /// Plays the event.
 /// </summary>
 /// <param name="domainEvent">The domain event.</param>
 private void PlayEvent(SMSMessageDeliveredEvent domainEvent)
 {
     this.MessageStatus = MessageStatus.Delivered;
 }