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

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


                oneOf(fileDownloader).getHost(fixedUrl);
                will(throwException(new MalformedURLException()));
            }
        });

        ServiceActionContext currentContext = new ServiceActionContext("someurl.com", principalMock);

        sut.execute(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here


                oneOf(mapperMock).execute(with(any(UniqueStringRequest.class)));
                will(returnValue(link));
            }
        });

        ServiceActionContext currentContext = new ServiceActionContext("http://www.youtube.com/someFile.html",
                principalMock);

        Assert.assertEquals(link, sut.execute(currentContext));

        context.assertIsSatisfied();
View Full Code Here

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

     */
    @Test
    public void testSuccessfulValidationPopularSortCriteria()
    {
        GetGalleryItemsRequest currentRequest = new GetGalleryItemsRequest(POPULARITY_SORT_CRITERIA, "", 0, 1);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        sut.validate(currentContext);
    }
View Full Code Here

     */
    @Test
    public void testSuccessfulValidationRecentSortCriteria()
    {
        GetGalleryItemsRequest currentRequest = new GetGalleryItemsRequest(RECENT_SORT_CRITERIA, "", 0, 1);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        sut.validate(currentContext);
    }
View Full Code Here

     */
    @Test(expected = ValidationException.class)
    public void testFailureValidationBadSortCriteria()
    {
        GetGalleryItemsRequest currentRequest = new GetGalleryItemsRequest("incompatible sort criteria", "", 0, 1);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);

        sut.validate(currentContext);
    }
View Full Code Here

     */
    private ServiceActionContext getActionContext(final String url)
    {
        HashMap<String, Serializable> params = new HashMap<String, Serializable>();
        params.put("url", url);
        return new ServiceActionContext(params, null);
    }
View Full Code Here

            {
                oneOf(mockValidator).validate(with(any(PrincipalActionContext.class)));
            }
        });

        ServiceActionContext currentContext = new ServiceActionContext(request, principalMock);
        sut.validate(currentContext);
    }
View Full Code Here

    public void testValidateFailureInvalidFollowingStatus()
    {
        SetFollowingStatusRequest request = new SetFollowingStatusRequest("ntaccount", "followingntaccount",
                EntityType.PERSON, false, Follower.FollowerStatus.NOTSPECIFIED);

        ServiceActionContext currentContext = new ServiceActionContext(request, principalMock);
        sut.validate(currentContext);
    }
View Full Code Here

     */
    @Before
    public void setUp()
    {
        asyncActionInnerContext = new AsyncActionContext(parentParam);
        serviceActionInnerContext = new ServiceActionContext(parentParam, principal);
        serviceActionInnerContextNullPrincipal = new ServiceActionContext(parentParam, null);
        userActionRequests.clear();
        mockery.checking(new Expectations()
        {
            {
                allowing(principal).getAccountId();
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.