Exemplo n.º 1
0
 public void Setup()
 {
     _post = new Post {Title = "Post Title"};
     _post.SetSlugForPost("This is a test!#");
 }
Exemplo n.º 2
0
 Post CreateNewPostFromDetails(PostDetailsBase details)
 {
     var post = new Post {
     Title = details.Title,
     Content = details.Content,
     AllowComments = details.AllowComments,
     Published = details.Published,
     DateCreated = DateTime.Now,
     DateModified = DateTime.Now,
     DatePublished = details.DatePublished,
     Tags = GetTagsFromString(details.Tags)
       };
       if (details.Published) post.PublishOn(details.DatePublished);
       post.SetSlugForPost(details.Slug);
       EnsurePostSlugIsUnique(post);
       return post;
 }