public string FormatText_returns_expected_result(string inString)
 {
     var result = new HtmlTextFormatter().FormatText(inString);
     var htmlString = result.ToHtmlString();
     Debug.WriteLine("Input: {0}, Output: {1}", inString ?? "<null>", htmlString);
     return htmlString;
 }
        public TaskViewModel(Task task)
        {
            Ensure.ArgumentIsNotNull(task, "task");

            Description = new HtmlTextFormatter().FormatText(task.Description);
            DueOn = task.DueOn.HasValue ? task.DueOn.Value.ToShortDateString() : "None";
            Id = task.Id;
            Title = task.Title;
        }
 public TaskRowViewModel(Task task)
 {
     Description = new HtmlTextFormatter().FormatText(task.Description);
     DueOn = task.DueOn.HasValue ? task.DueOn.Value.ToShortDateString() : "None";
     HasDueDate = task.DueOn.HasValue;
     Id = task.Id;
     IsCompleted = task.IsCompleted;
     IsDueToday = !task.IsCompleted && task.DueOn.HasValue && task.DueOn.Value == DateTime.Today;
     IsPastDue = !task.IsCompleted && task.DueOn.HasValue && task.DueOn.Value < DateTime.Today;
     ShowCompleteButton = !task.IsCompleted;
     Tags = task.Tags.Select(tag => new TagViewModel(tag)).ToArray();
     Title = task.Title;
 }