Package org.eurekastreams.commons.actions.context.service

Examples of org.eurekastreams.commons.actions.context.service.ServiceActionContext


     */
    @Test(expected = InvalidActionException.class)
    public void testExecuteMissingValidation()
    {
        ServiceAction action = new ServiceAction(null, authorizationStrategy, executionStrategy, false);
        final ServiceActionContext context = new ServiceActionContext(null, principalMock);
        sut.execute(context, action);
        mockery.assertIsSatisfied();
    }
View Full Code Here


     */
    @Test(expected = InvalidActionException.class)
    public void testExecuteMissingAuthorization()
    {
        ServiceAction action = new ServiceAction(validationStrategy, null, executionStrategy, false);
        final ServiceActionContext context = new ServiceActionContext(null, principalMock);
        sut.execute(context, action);
        mockery.assertIsSatisfied();
    }
View Full Code Here

            }
        });

        // Set up the call parameters
        GetGalleryItemsRequest currentRequest = new GetGalleryItemsRequest("popularity", "News", 0, 7);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        // Make the call
        PagedSet<GadgetDefinition> results = sut.execute(currentContext);

        assertEquals(message, pagedSet, results);
View Full Code Here

            }
        });

        // Set up the call parameters
        GetGalleryItemsRequest currentRequest = new GetGalleryItemsRequest("popularity", "", 0, 7);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        // Make the call
        PagedSet<GadgetDefinition> results = sut.execute(currentContext);

        assertEquals(message, pagedSet, results);
View Full Code Here

            }
        });

        // Set up the call parameters
        GetGalleryItemsRequest currentRequest = new GetGalleryItemsRequest("recent", "News", 0, 7);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        // Make the call
        PagedSet<GadgetDefinition> results = sut.execute(currentContext);

        assertEquals(message, pagedSet, results);
View Full Code Here

            }
        });

        // Set up the call parameters
        GetGalleryItemsRequest currentRequest = new GetGalleryItemsRequest("recent", "", 0, 7);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        // Make the call
        PagedSet<GadgetDefinition> results = sut.execute(currentContext);

        assertEquals(message, pagedSet, results);
View Full Code Here

     *            the theme id to set as the parameter
     * @return a server action context for testing
     */
    private PrincipalActionContext buildServerActionContext(final String themeId)
    {
        return new ServiceActionContext(themeId, TestContextCreator.createPrincipal(username, userId));
    }
View Full Code Here

        // invoke
        GetDirectorySearchResultsRequest currentRequest = new GetDirectorySearchResultsRequest(SEARCH_TEXT,
                "background", FROM, TO, "");

        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, principalMock);

        PagedSet<ModelView> pagedSet = sut.execute(currentActionContext);

        // assert
        assertTrue(pagedSet.getElapsedTime().length() > 0);
View Full Code Here

        // invoke
        GetDirectorySearchResultsRequest currentRequest = new GetDirectorySearchResultsRequest(SEARCH_TEXT,
                "background", FROM, TO, "");

        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, principalMock);

        PagedSet<ModelView> pagedSet = sut.execute(currentActionContext);

        // assert
        assertEquals(FROM, pagedSet.getFromIndex());
View Full Code Here

        // invoke
        GetDirectorySearchResultsRequest currentRequest = new GetDirectorySearchResultsRequest(SEARCH_TEXT,
                "background", FROM, TO, "");

        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, principalMock);

        PagedSet<ModelView> pagedSet = sut.execute(currentActionContext);

        // assert
        assertTrue(pagedSet.getElapsedTime().length() > 0);
View Full Code Here

TOP

Related Classes of org.eurekastreams.commons.actions.context.service.ServiceActionContext

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.