Ejemplo n.º 1
0
 private void UpdatePlannedPostPropertiesIfApplicable(BlogPost postToEdit, ITrelloCard card)
 {
     if (card.ListName == PlannedPostsListName)
     {
         card.DueDate = postToEdit.DraftDate.SafeToMidnightEastern();
         card.UpdateLabels(Board.GetLabelsForCompany(postToEdit.BlogCompanyName));
         card.UpdateMembers(Board.GetMembersWithUserNames(postToEdit.AuthorTrelloUserName, postToEdit.EditorTrelloUserName));
     }
 }
        public static void BuildDescriptionFromBlogPost(this ITrelloCard target, BlogPost post)
        {
            var ghostwrittenText = post.IsGhostwritten ? "Ghostwritten" : string.Empty;
            var doublePostText   = post.IsDoublePost ? "Double Post" : string.Empty;

            var specialConsiderationText = GenerateCommaSeparatedList(ghostwrittenText, doublePostText);

            target.Description = SeparateIntoLines($"{Bold("Mission")}: {post.Mission}",
                                                   $"{Bold("Keyword")}: {post.Keyword}",
                                                   $"{Bold("Persona (Intended Audience)")}: {post.Persona}",
                                                   $"{Bold("Post Notes")}: {post.PostNotes}",
                                                   $"{Bold("Client Notes")}: {post.ClientNotes}",
                                                   $"{Bold("Special Considerations")}: {specialConsiderationText}");
        }
 public void BeforeEachTest()
 {
     Card = Mock.Create <ITrelloCard>();
 }
 private void UpdatePlannedPostPropertiesIfApplicable(Whitepaper whitepaperToEdit, ITrelloCard card)
 {
     if (card.ListName == PlannedPostsListName)
     {
         card.DueDate = whitepaperToEdit.TargetOutlineDate.SafeToMidnightEastern();
         card.UpdateLabels(Board.GetLabelsForCompany(whitepaperToEdit.Blog.CompanyName));
         card.UpdateMembers(Board.GetMembersWithUserNames(whitepaperToEdit.AuthorTrelloUserName, whitepaperToEdit.EditorTrelloUserName));
     }
 }