Package org.eurekastreams.commons.actions.context

Examples of org.eurekastreams.commons.actions.context.ActionContext


                                endIndex))));
                will(returnValue(expectedReturnValue));
            }
        });

        Serializable returnValue = sut.execute(new ActionContext()
        {
            /**
             * Serial version uid.
             */
            private static final long serialVersionUID = -2804552268718221598L;
View Full Code Here


                oneOf(testPrefs1).getJsonUserPref();
                will(returnValue(userPrefsJson));
            }
        });

        sut.execute(new ActionContext()
        {
            private static final long serialVersionUID = 1846377112179005545L;

            @Override
            public Serializable getParams()
View Full Code Here

    public void testExecute()
    {
        final Long personId = 28381L;
        final Person person = context.mock(Person.class);
        final String accountId = "sdlkjfsdlkj";
        final ActionContext actionContext = context.mock(ActionContext.class);

        final List<Long> activityIdsAuthoredByPerson = new ArrayList<Long>();
        final List<Long> commentIdsAuthoredByPerson = new ArrayList<Long>();
        final List<Long> activityIdsWithEmbeddedCommentsAuthoredByPerson = new ArrayList<Long>();
View Full Code Here

                        activitiesWithEmbeddedComments, personMock);
            }
        });

        // perform sut
        sut.execute(new ActionContext()
        {
            @Override
            public Serializable getParams()
            {
                return personId;
View Full Code Here

     */
    @SuppressWarnings("serial")
    @Test
    public void test()
    {
        ActionContext ctx = new ActionContext()
        {
            public Serializable getParams()
            {
                // a sample request that implements HasGroupId
                return new GetRequestForGroupMembershipRequest(8L, null, 0, 0);
View Full Code Here

     */
    @Test
    public void testTransform()
    {
        RequestTransformer sut = new SetCurrentUserNotificationPreferencesTransformer(notifierTypes, categories);
        ActionContext ctx = TestContextCreator.createPrincipalActionContext(
                (Serializable) Arrays.asList(dto1, dto2, dto3), null, PERSON_ID);
        SetUserNotificationFilterPreferencesRequest result = (SetUserNotificationFilterPreferencesRequest) sut
                .transform(ctx);

        assertEquals(PERSON_ID, result.getPersonId());
View Full Code Here

     */
    @Test
    public void testValidateValid()
    {
        ValidationStrategy<ActionContext> sut = new DisableNotificationCategoryValidation(CATEGORIES);
        ActionContext ctx = TestContextCreator.createPrincipalActionContext("LIKE", null);
        sut.validate(ctx);
    }
View Full Code Here

     */
    @Test(expected = ValidationException.class)
    public void testValidateInvalid()
    {
        ValidationStrategy<ActionContext> sut = new DisableNotificationCategoryValidation(CATEGORIES);
        ActionContext ctx = TestContextCreator.createPrincipalActionContext("NOSUCH", null);
        sut.validate(ctx);
    }
View Full Code Here

                {
                    @Override
                    protected boolean isMatch(final TaskHandlerActionContext inTestObject)
                    {
                        assertSame(userActionRequests, inTestObject.getUserActionRequests());
                        ActionContext innerContext = inTestObject.getActionContext();
                        assertSame(parameters, innerContext.getParams());
                        return true;
                    }
                }));
                will(returnValue(results));
            }
View Full Code Here

                {
                    @Override
                    protected boolean isMatch(final TaskHandlerActionContext inTestObject)
                    {
                        assertSame(userActionRequests, inTestObject.getUserActionRequests());
                        ActionContext innerContext = inTestObject.getActionContext();
                        assertTrue(innerContext instanceof PrincipalActionContext);
                        assertSame(principal, ((PrincipalActionContext) innerContext).getPrincipal());
                        assertSame(parameters, innerContext.getParams());
                        return true;
                    }
                }));
                will(returnValue(results));
            }
View Full Code Here

TOP

Related Classes of org.eurekastreams.commons.actions.context.ActionContext

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.