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

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


                oneOf(gadgetMapper).flush();
            }
        });

        SetGadgetStateRequest currentRequest = new SetGadgetStateRequest(GADGET_ID1, State.MINIMIZED);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        Gadget actual = sut.execute(currentContext);

        assertEquals("Did not return the right Tab", actual, expected);
    }
View Full Code Here


            }
        });

        SetGadgetStateRequest currentRequest = new SetGadgetStateRequest(noSuchGadgetId, State.MINIMIZED);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);
    }
View Full Code Here

                // write back to the database
                oneOf(tabMapper).flush();
            }
        });

        ServiceActionContext currentContext = new ServiceActionContext(targetGadgetId, principalMock);
        sut.execute(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here

                // write back to the database
                oneOf(tabMapper).flush();
            }
        });

        ServiceActionContext currentContext = new ServiceActionContext(targetGadgetId, principalMock);
        sut.execute(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here

                // write back to the database
                oneOf(tabMapper).flush();
            }
        });

        ServiceActionContext currentContext = new ServiceActionContext(targetGadgetId, principalMock);
        sut.execute(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here

                // an exception will be thrown before doing anything else
            }
        });

        ServiceActionContext currentContext = new ServiceActionContext(targetGadgetId, principalMock);
        sut.execute(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here

    @Test
    public void testPublicGroupDestinationActivityPostSuccessfulAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        final Set<Long> groupCoords = new HashSet<Long>();
        groupCoords.add(ID);

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

    @Test
    public void testPersonDestinationActivityPostSuccessfulAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        context.checking(new Expectations()
        {
            {
                allowing(testActivity).getDestinationStream();
View Full Code Here

    @Test
    public void testPersonDestinationActivityPostSuccessfulStreamPostableAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        context.checking(new Expectations()
        {
            {
                allowing(testActivity).getDestinationStream();
View Full Code Here

    @Test(expected = AuthorizationException.class)
    public void testInvalidDestinationActivityPostFailureAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        context.checking(new Expectations()
        {
            {
                allowing(testActivity).getDestinationStream();
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.