Examples of TaskHandlerAction


Examples of org.eurekastreams.commons.actions.TaskHandlerAction

     * Test.
     */
    @Test(expected = InvalidActionException.class)
    public void testExecuteTHMissingValidation()
    {
        TaskHandlerAction action = new TaskHandlerServiceAction(null, authorizationStrategy,
                taskHandlerExecutionStrategy, taskHandlerMock, false);
        sut.execute(new ServiceActionContext(null, principalMock), action);
        mockery.assertIsSatisfied();
    }
View Full Code Here

Examples of org.eurekastreams.commons.actions.TaskHandlerAction

     * Test.
     */
    @Test(expected = InvalidActionException.class)
    public void testExecuteTHMissingAuthorization()
    {
        TaskHandlerAction action = new TaskHandlerServiceAction(validationStrategy, null,
                taskHandlerExecutionStrategy, taskHandlerMock, false);
        sut.execute(new ServiceActionContext(null, principalMock), action);
        mockery.assertIsSatisfied();
    }
View Full Code Here

Examples of org.eurekastreams.commons.actions.TaskHandlerAction

     * Test.
     */
    @Test(expected = InvalidActionException.class)
    public void testExecuteTHMissingExecution()
    {
        TaskHandlerAction action = new TaskHandlerServiceAction(validationStrategy, authorizationStrategy, null,
                taskHandlerMock, false);
        sut.execute(new ServiceActionContext(null, principalMock), action);
        mockery.assertIsSatisfied();
    }
View Full Code Here

Examples of org.eurekastreams.commons.actions.TaskHandlerAction

     * Test.
     */
    @Test(expected = InvalidActionException.class)
    public void testExecuteTHMissingTaskHandler()
    {
        TaskHandlerAction action = new TaskHandlerServiceAction(validationStrategy, authorizationStrategy,
                taskHandlerExecutionStrategy, null, false);
        sut.execute(new ServiceActionContext(null, principalMock), action);
        mockery.assertIsSatisfied();
    }
View Full Code Here

Examples of org.eurekastreams.commons.actions.TaskHandlerAction

    @Test
    public void test()
    {
        final TextSplitter textSplitter = mockery.mock(TextSplitter.class, "textSplitter");
        final InlineActionExecutor executor = mockery.mock(InlineActionExecutor.class, "executor");
        final TaskHandlerAction postCommentAction = mockery.mock(TaskHandlerAction.class, "postCommentAction");

        final String inputString = "  This is the text to be split and posted as multiple comments.  ";
        final String piece1 = "This is the text...";
        final String piece2 = "...to be split and posted...";
        final String piece3 = "...as multiple comments.";
View Full Code Here

Examples of org.eurekastreams.commons.actions.TaskHandlerAction

        activityToPost.setBaseObjectType(BaseObjectType.NOTE);
        activityToPost.setVerb(ActivityVerb.POST);
        activityToPost.setDestinationStream(new StreamEntityDTO(request.getEntityType(), uniqueId));
        activityToPost.setBaseObjectProperties(new HashMap<String, String>(Collections.singletonMap("content",
                pieces.get(0))));
        TaskHandlerAction postActivityAction = postActivityActions.get(request.getEntityType());
        ActivityDTO postedActivity = (ActivityDTO) executor.execute(postActivityAction, inActionContext,
                new PostActivityRequest(activityToPost));

        // post the comments
        for (String piece : pieces.subList(1, pieces.size()))
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.