public JsonComment Map(Comment comment) { if (comment == null) { return null; } return new JsonComment { Text = comment.Text }; }
public void Map_NotNull_ReturnsJsonCommentWithSameText() { Comment comment = new Comment { Text = "Some comment" }; var mapper = CreateMapper(); var result = mapper.Map(comment); Check.That(result.Text).IsEqualTo("Some comment"); }