Package org.eurekastreams.server.action.request.profile

Examples of org.eurekastreams.server.action.request.profile.RequestForGroupMembershipRequest


     *             should not occur
     */
    @Test
    public final void testPerformAction() throws Exception
    {
        final RequestForGroupMembershipRequest mapperRqst = new RequestForGroupMembershipRequest(GROUP_ID, USER_ID);
        context.checking(new Expectations()
        {
            {
                allowing(groupMapper).findByShortName(GROUP_SHORTNAME);
                will(returnValue(groupMock));
View Full Code Here


     *             - on error.
     */
    @Test
    public void testSetFollowing() throws Exception
    {
        final RequestForGroupMembershipRequest delRequest = new RequestForGroupMembershipRequest(GROUP_ID, 1L);

        context.checking(new Expectations()
        {
            {
                oneOf(getPersonIdFromAccountIdMapper).execute(with(any(String.class)));
View Full Code Here

    public void testSetFollowingWithDifferentRequestObject() throws Exception
    {
        final PersonModelView testFollower = new PersonModelView();
        testFollower.setEntityId(FOLLOWER_ID);

        final RequestForGroupMembershipRequest delRequest = new RequestForGroupMembershipRequest(GROUP_ID, 1L);

        final PersonModelView person = context.mock(PersonModelView.class);

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

    public void testFollowPrivateGroup()
    {
        SetFollowingStatusRequest request = new SetFollowingStatusRequest(FOLLOWER_ACCOUNT, GROUP_UNIQUEID,
                EntityType.GROUP, false, FollowerStatus.FOLLOWING);

        final RequestForGroupMembershipRequest mapperRequest1 = new RequestForGroupMembershipRequest(GROUP_ID,
                FOLLOWER_ID);

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

     */
    @Before
    public void setUp()
    {
        sut = new DeleteRequestForGroupMembershipExecution(mapper);
        request = new RequestForGroupMembershipRequest(GROUP_ID, PERSON_ID);
    }
View Full Code Here

                if (new WidgetJSNIFacadeImpl().confirm("Are you sure you want to deny this user membership?"))
                {
                    buttonsPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().waitActive());

                     GroupMembershipRequestModel.getInstance().delete(
                            new RequestForGroupMembershipRequest(groupId, item.getEntityId()));
                }
            }
        });

        return panel;
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext)
    {
        RequestForGroupMembershipRequest request = (RequestForGroupMembershipRequest) inActionContext
                .getActionContext().getParams();

        mapper.execute(request);

        // send notification
        inActionContext.getUserActionRequests().add(
                new UserActionRequest(CreateNotificationsRequest.ACTION_NAME, null,
                        new GroupMembershipResponseNotificationsRequest(RequestType.REQUEST_GROUP_ACCESS_DENIED,
                                inActionContext.getActionContext().getPrincipal().getId(), request.getGroupId(),
                                request.getPersonId())));

        return null;
    }
View Full Code Here

        Query query =
                getEntityManager().createQuery("FROM GroupMembershipRequests WHERE groupId=8 and personId=" + userid);
        assertTrue(query.getResultList().isEmpty());

        Boolean result = sut.execute(new RequestForGroupMembershipRequest(8L, userid));
        assertTrue(result);

        assertEquals(1, query.getResultList().size());
    }
View Full Code Here

     */
    @Test
    public void testExecuteAlreadyPresent()
    {
        final long userid = 4507L;
        Boolean result = sut.execute(new RequestForGroupMembershipRequest(8L, userid));
        assertFalse(result);
    }
View Full Code Here

        Query query =
                getEntityManager().createQuery("FROM GroupMembershipRequests WHERE groupId=8 and personId=" + userid);
        assertFalse(query.getResultList().isEmpty());

        Boolean result = sut.execute(new RequestForGroupMembershipRequest(8L, userid));
        assertTrue(result);

        assertTrue(query.getResultList().isEmpty());
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.profile.RequestForGroupMembershipRequest

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.