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

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


                oneOf(pMapper).execute(with(equalInternally(new FindByIdRequest("Person", 1L))));
                will(returnValue(null));
            }
        });

        final ServiceActionContext currentContext = new ServiceActionContext(id, principalMock);

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


     * bad param.
     */
    @Test(expected = ValidationException.class)
    public void testBadParamvalidation()
    {
        final ServiceActionContext currentContext = new ServiceActionContext("Bad param", principalMock);

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

    {
        Stream stream = new Stream();
        stream.setName("something");
        stream.setRequest("{ query : { recipient: [ { name: 'something', type: 'GROUP' } ] } }");

        PrincipalActionContext actionContext = new ServiceActionContext(stream, null);

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

    public void testInvalidEmpty()
    {
        Stream stream = new Stream();
        stream.setName("");

        PrincipalActionContext actionContext = new ServiceActionContext(stream, null);

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

    public void testInvalidNull()
    {
        Stream stream = new Stream();
        stream.setName(null);

        PrincipalActionContext actionContext = new ServiceActionContext(stream, null);

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

    {
        Stream stream = new Stream();
        stream.setName("something");
        stream.setRequest("{ query : { recipient: [  ] } }");

        PrincipalActionContext actionContext = new ServiceActionContext(stream, null);

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

        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(getPersonIdByAccountIdMapper).execute("followingntaccount");
                will(returnValue(2L));
            }
        });

        ServiceActionContext currentContext = new ServiceActionContext(request, principalMock);
        sut.validate(currentContext);

        context.assertIsSatisfied();
    }
View Full Code Here

        });

        Map<String, String> errors = null;
        try
        {
            ServiceActionContext currentContext = new ServiceActionContext(request, principalMock);
            sut.validate(currentContext);
        }
        catch (ValidationException vex)
        {
            errors = vex.getErrors();
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.