Package org.eurekastreams.commons.actions.context

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


        request += "] } }";
       
        stream.setRequest(request);

        PrincipalActionContext actionContext = new ServiceActionContext(stream, null);

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


        Stream stream = new Stream();
        stream.setName("something");
        // Missing open curly brace
        stream.setRequest(" query : { recipient: [  ] } }");

        PrincipalActionContext actionContext = new ServiceActionContext(stream, null);

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

                oneOf(mapper).execute(with(any(SetUserNotificationFilterPreferencesRequest.class)));
                will(rqstInt);
            }
        });

        PrincipalActionContext ctx = TestContextCreator.createPrincipalActionContext("FOLLOW", null, 8L);
        sut.execute(ctx);

        context.assertIsSatisfied();
        SetUserNotificationFilterPreferencesRequest rqst = rqstInt.getObject();
        assertEquals(8L, rqst.getPersonId());
View Full Code Here

        final Long personId = 5L;
        final List<PersonModelView> people = new ArrayList<PersonModelView>();
        final List<DomainGroupModelView> groups = new ArrayList<DomainGroupModelView>();
        final SuggestedStreamsRequest request = new SuggestedStreamsRequest(personId, 10);

        final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class);
        final Principal principal = context.mock(Principal.class);

        final StreamDiscoverListsDTO result = new StreamDiscoverListsDTO();

        people.add(new PersonModelView(1L, "a", "foo", "bar", null, "", 100, new Date(), 1L));
View Full Code Here

    {
        final List<Long> activities = Arrays.asList(1L, 2L, 3L);

        sut = new GetActivityIDs(getIdsMock);

        final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class);
        final String request = "{}";
        final Long userId = 1L;

        final Principal principle = context.mock(Principal.class);
View Full Code Here

                oneOf(mapper).execute(PERSON_ID);
                will(returnValue(Arrays.asList(dto1, dto2, dto3)));
            }
        });

        PrincipalActionContext ctx = TestContextCreator.createPrincipalActionContext(null, null, PERSON_ID);
        GetUserNotificationFilterPreferencesResponse result = (GetUserNotificationFilterPreferencesResponse) sut
                .execute(ctx);

        context.assertIsSatisfied();
View Full Code Here

                oneOf(mapper).execute(PERSON_ID);
                will(returnValue(Collections.EMPTY_LIST));
            }
        });

        PrincipalActionContext ctx = TestContextCreator.createPrincipalActionContext(null, null, PERSON_ID);
        GetUserNotificationFilterPreferencesResponse result = (GetUserNotificationFilterPreferencesResponse) sut
                .execute(ctx);

        context.assertIsSatisfied();
View Full Code Here

        assertMapperMoveCall(gadgetId, tab1.getTemplate().getId(), 1, 1, tab1.getTemplate().getId(), 1, 0);

        final ReorderGadgetRequest request = new ReorderGadgetRequest(tab1.getId(), gadgetId, 0, 1);
        final Map<String, Object> state = new HashMap<String, Object>();
        final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class);
        final Principal principalMock = context.mock(Principal.class);

        context.checking(new Expectations()
        {
            {
View Full Code Here

        final long gadgetId = tab1GadgetIds.get(4);
        setupSourceAndDestinationTabs(tab1, tab1, gadgetId);

        assertMapperMoveCall(gadgetId, tab1.getTemplate().getId(), 1, 1, tab1.getTemplate().getId(), 2, 3);

        final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class);
        final Principal principalMock = context.mock(Principal.class);
        final ReorderGadgetRequest request = new ReorderGadgetRequest(tab1.getId(), gadgetId, 3, 2);
        final Map<String, Object> state = new HashMap<String, Object>();

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

        setupSourceAndDestinationTabs(tab1, tab2, gadgetId);

        assertMapperMoveCall(gadgetId, tab1.getTemplate().getId(), 1, 1, tab2.getTemplate().getId(), 0, 2);

        final PrincipalActionContext actionContext = context.mock(PrincipalActionContext.class);
        final Principal principalMock = context.mock(Principal.class);
        final ReorderGadgetRequest request = new ReorderGadgetRequest(tab2.getId(), gadgetId, destinationZoneNumber,
                destinationZoneIndex);
        final Map<String, Object> state = new HashMap<String, Object>();
View Full Code Here

TOP

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

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.