Package com.saasovation.collaboration.domain.model.forum

Examples of com.saasovation.collaboration.domain.model.forum.Forum


        super();
    }

    public void testCloseDiscussion() throws Exception {

        Forum forum = this.forumAggregate();

        DomainRegistry.forumRepository().save(forum);

        Discussion discussion = this.discussionAggregate(forum);
View Full Code Here


        assertTrue(closedDiscussion.isClosed());
    }

    public void testPostToDiscussion() throws Exception {

        Forum forum = this.forumAggregate();

        DomainRegistry.forumRepository().save(forum);

        Discussion discussion = this.discussionAggregate(forum);
View Full Code Here

        assertEquals("Post test text...", post.bodyText());
    }

    public void testPostToDiscussionInReplyTo() throws Exception {

        Forum forum = this.forumAggregate();

        DomainRegistry.forumRepository().save(forum);

        Discussion discussion = this.discussionAggregate(forum);
View Full Code Here

        assertEquals("Post test text in reply to...", postedInReplyTo.bodyText());
    }

    public void testReopenDiscussion() throws Exception {

        Forum forum = this.forumAggregate();

        DomainRegistry.forumRepository().save(forum);

        Discussion discussion = this.discussionAggregate(forum);
View Full Code Here

        super();
    }

    public void testAllDiscussionsDataOfForum() throws Exception {

        Forum forum = this.forumAggregate();
        DomainRegistry.forumRepository().save(forum);

        Discussion[] discussions = this.discussionAggregates(forum);

        for (Discussion discussion : discussions) {
            DomainRegistry.discussionRepository().save(discussion);
        }

        Collection<DiscussionData> discussionsData =
                discussionQueryService.allDiscussionsDataOfForum(
                        forum.tenant().id(),
                        forum.forumId().id());

        assertNotNull(discussionsData);
        assertFalse(discussionsData.isEmpty());
        assertEquals(discussions.length, discussionsData.size());
    }
View Full Code Here

        assertEquals(discussions.length, discussionsData.size());
    }

    public void testDiscussionDataOfId() throws Exception {

        Forum forum = this.forumAggregate();
        DomainRegistry.forumRepository().save(forum);

        Discussion discussion = this.discussionAggregate(forum);
        DomainRegistry.discussionRepository().save(discussion);
View Full Code Here

        assertEquals(discussion.isClosed(), discussionData.isClosed());
    }

    public void testDiscussionIdOfExclusiveOwner() throws Exception {

        Forum forum = this.forumAggregate();
        DomainRegistry.forumRepository().save(forum);

        Discussion discussion = this.discussionAggregate(forum);
        DomainRegistry.discussionRepository().save(discussion);
View Full Code Here

        assertEquals(discussion.discussionId().id(), discussionId);
    }

    public void testDiscussionPostsDataOfId() throws Exception {

        Forum forum = this.forumAggregate();
        DomainRegistry.forumRepository().save(forum);

        Discussion discussion = this.discussionAggregate(forum);
        DomainRegistry.discussionRepository().save(discussion);
View Full Code Here

        super();
    }

    public void testAssignModeratorToForum() throws Exception {

        Forum forum = this.forumAggregate();

        DomainRegistry.forumRepository().save(forum);

        forumApplicationService
            .assignModeratorToForum(
                    forum.tenant().id(),
                    forum.forumId().id(),
                    "newModerator");

        forum = DomainRegistry
                    .forumRepository()
                    .forumOfId(
                            forum.tenant(),
                            forum.forumId());

        assertNotNull(forum);
        assertEquals("newModerator", forum.moderator().identity());
    }
View Full Code Here

        assertEquals("newModerator", forum.moderator().identity());
    }

    public void testChangeForumDescription() throws Exception {

        Forum forum = this.forumAggregate();

        assertFalse("A changed description.".equals(forum.description()));

        DomainRegistry.forumRepository().save(forum);

        forumApplicationService
            .changeForumDescription(
                    forum.tenant().id(),
                    forum.forumId().id(),
                    "A changed description.");

        forum = DomainRegistry
                    .forumRepository()
                    .forumOfId(
                            forum.tenant(),
                            forum.forumId());

        assertNotNull(forum);
        assertEquals("A changed description.", forum.description());
    }
View Full Code Here

TOP

Related Classes of com.saasovation.collaboration.domain.model.forum.Forum

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.