Package com.saasovation.collaboration.application.forum.data

Examples of com.saasovation.collaboration.application.forum.data.PostData


        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());
        }
    }
View Full Code Here

TOP

Related Classes of com.saasovation.collaboration.application.forum.data.PostData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.