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

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


    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.VALID, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        context.checking(new Expectations()
        {
            {
                oneOf(postVerbValMock).validate(with(any(ActivityDTO.class)));
View Full Code Here


    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.NULLSTREAM, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

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

    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.NULLIDENTIFIER, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

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

    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.EMPTYIDENTIFIER, true, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

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

    {
        ActivityDTO currentActivity = PostActivityTestHelpers.buildActivityDTO(
                PostActivityTestHelpers.DestinationStreamTestState.INVALIDTYPE, false, testComment, DESTINATION_ID);

        currentRequest = new PostActivityRequest(currentActivity);
        currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

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

                oneOf(imageWriter).write(file, "n" + BANNER_ID);
            }
        });
        SaveImageRequest currentRequest = new SaveImageRequest(file, ORG_ID, BANNER_ID);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here

                oneOf(imageWriter).write(file, "n" + BANNER_ID);
                will(throwException(new IOException()));
            }
        });
        SaveImageRequest currentRequest = new SaveImageRequest(file, ORG_ID, BANNER_ID);
        ServiceActionContext currentContext = new ServiceActionContext(currentRequest, principalMock);
        sut.execute(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here

     */
    @Test
    public void transform()
    {
        PassThruRequestTransformer sut = new PassThruRequestTransformer();
        ServiceActionContext currentContext = new ServiceActionContext(1L, null);
        assertEquals(1L, sut.transform(currentContext));
    }
View Full Code Here

    {
        HashMap<String, Serializable> hash = new HashMap<String, Serializable>();
        hash.put("key", "value");

        HashMapValueRequestTransformer sut = new HashMapValueRequestTransformer("key");
        ServiceActionContext currentContext = new ServiceActionContext(hash, null);
        assertEquals("value", sut.transform(currentContext));
    }
View Full Code Here

     */
    @Test
    public void test()
    {
        WrapInListRequestTransformer sut = new WrapInListRequestTransformer();
        ServiceActionContext currentContext = new ServiceActionContext(1L, null);

        Serializable result = sut.transform(currentContext);

        assertNotNull(result);

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.