DomainRegistry.discussionRepository().save(discussion);
Post post = this.postAggregate(discussion);
DomainRegistry.postRepository().save(post);
PostData postData =
postQueryService.postDataOfId(
post.tenant().id(), post.postId().id());
assertNotNull(postData);
assertEquals(post.postId().id(), postData.getPostId());
assertEquals(post.discussionId().id(), postData.getDiscussionId());
assertEquals(post.forumId().id(), postData.getForumId());
assertEquals(post.tenant().id(), postData.getTenantId());
assertEquals(post.author().emailAddress(), postData.getAuthorEmailAddress());
assertEquals(post.author().identity(), postData.getAuthorIdentity());
assertEquals(post.author().name(), postData.getAuthorName());
// assertEquals(post.changedOn(), postData.getChangedOn());
// assertEquals(post.createdOn(), postData.getCreatedOn());
assertEquals(post.subject(), postData.getSubject());
assertEquals(post.bodyText(), postData.getBodyText());
if (postData.getReplyToPostId() == null) {
assertEquals(post.replyToPostId(), postData.getReplyToPostId());
} else {
assertEquals(post.replyToPostId().id(), postData.getReplyToPostId());
}
}