Examples of PostSplitActivityAndCommentsRequest


Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test
    public void testValid()
    {
        sut.validate(TestContextCreator.createPrincipalActionContext(new PostSplitActivityAndCommentsRequest(null, 0,
                "text"), null));
    }
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test(expected = ValidationException.class)
    public void testNullText()
    {
        sut.validate(TestContextCreator.createPrincipalActionContext(new PostSplitActivityAndCommentsRequest(null, 0,
                null), null));
    }
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test(expected = ValidationException.class)
    public void testEmptyText()
    {
        sut.validate(TestContextCreator.createPrincipalActionContext(new PostSplitActivityAndCommentsRequest(null, 0,
                ""), null));
    }
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test(expected = ValidationException.class)
    public void testBlankText()
    {
        sut.validate(TestContextCreator.createPrincipalActionContext(new PostSplitActivityAndCommentsRequest(null, 0,
                " \t  "), null));
    }
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test(expected = ValidationException.class)
    public void testInvalidStreamType()
    {
        PostSplitActivityAndCommentsRequest request = new PostSplitActivityAndCommentsRequest(EntityType.RESOURCE,
                PERSON_ID, INPUT_STRING);
        TaskHandlerActionContext<PrincipalActionContext> context = TestContextCreator
                .createTaskHandlerContextWithPrincipal(request, USER_ACCOUNT_ID, USER_ID);

        sut.execute(context);
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test(expected = ValidationException.class)
    public void testEmptyText()
    {
        PostSplitActivityAndCommentsRequest request = new PostSplitActivityAndCommentsRequest(EntityType.PERSON,
                PERSON_ID, INPUT_STRING);
        TaskHandlerActionContext<PrincipalActionContext> context = TestContextCreator
                .createTaskHandlerContextWithPrincipal(request, USER_ACCOUNT_ID, USER_ID);

        mockery.checking(new Expectations()
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test
    public void testActivityOnlyPersonStream()
    {
        PostSplitActivityAndCommentsRequest request = new PostSplitActivityAndCommentsRequest(EntityType.PERSON,
                PERSON_ID, INPUT_STRING);
        final TaskHandlerActionContext<PrincipalActionContext> context = TestContextCreator
                .createTaskHandlerContextWithPrincipal(request, USER_ACCOUNT_ID, USER_ID);

        mockery.checking(new Expectations()
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test
    public void testActivityOnlyGroupStream()
    {
        PostSplitActivityAndCommentsRequest request = new PostSplitActivityAndCommentsRequest(EntityType.GROUP,
                GROUP_ID, INPUT_STRING);
        final TaskHandlerActionContext<PrincipalActionContext> context = TestContextCreator
                .createTaskHandlerContextWithPrincipal(request, USER_ACCOUNT_ID, USER_ID);

        mockery.checking(new Expectations()
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

     * Test.
     */
    @Test
    public void testActivityAndComments()
    {
        PostSplitActivityAndCommentsRequest request = new PostSplitActivityAndCommentsRequest(EntityType.PERSON,
                PERSON_ID, INPUT_STRING);
        final TaskHandlerActionContext<PrincipalActionContext> context = TestContextCreator
                .createTaskHandlerContextWithPrincipal(request, USER_ACCOUNT_ID, USER_ID);

        final Sequence seq = mockery.sequence("posts");
View Full Code Here

Examples of org.eurekastreams.server.action.request.stream.PostSplitActivityAndCommentsRequest

        }
        // ID of person -> Post to personal stream
        else if (tokenData.containsKey(TokenContentFormatter.META_KEY_PERSON_STREAM))
        {
            return new UserActionRequest("postSplitActivityAndCommentsAction", null,
                    new PostSplitActivityAndCommentsRequest(EntityType.PERSON,
                            tokenData.get(TokenContentFormatter.META_KEY_PERSON_STREAM), content));
        }
        // ID of group -> Post to group stream
        else if (tokenData.containsKey(TokenContentFormatter.META_KEY_GROUP_STREAM))
        {
            return new UserActionRequest("postSplitActivityAndCommentsAction", null,
                    new PostSplitActivityAndCommentsRequest(EntityType.GROUP,
                            tokenData.get(TokenContentFormatter.META_KEY_GROUP_STREAM), content));
        }
        else
        {
            throw new ExecutionException("Cannot determine action to execute.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.