public CommentViewModel Build(Comment comment) { return new CommentViewModel { Text = comment.Text, AddedBy = comment.AddedBy.FullName, DateAdded = comment.DateAdded.ToString("dd MMMM yyyy HH:mm:ss") }; }
public static void ShouldHaveMappedTo(this CommentModel model, Comment comment) { comment.BlogPost.Id.Should().Be(model.BlogPostId); comment.Text.Should().Be(model.Comment); }
public static void ShouldBeMapped(this CommentViewModel commentViewModel, Comment comment) { commentViewModel.Text.Should().Be(comment.Text); commentViewModel.AddedBy.Should().Be(comment.AddedBy.FullName); }