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

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


    @Test
    public void testExecuteWithServiceAction()
    {
        Serializable params = null;

        final ServiceActionContext serviceActionContext = new ServiceActionContext(params, principalMock);
        transDef.setReadOnly(true);

        setupTransactionContext(true, serviceActionContext, false);

        sut.execute(serviceActionContext, serviceActionMock);
View Full Code Here


    @Test(expected = GeneralException.class)
    public void testExecuteWithServiceActionFailure()
    {
        Serializable params = null;

        final ServiceActionContext serviceActionContext = new ServiceActionContext(params, principalMock);
        transDef.setReadOnly(true);

        setupTransactionContext(true, serviceActionContext, true);

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

    @Test(expected = ValidationException.class)
    public void testExecuteWithServiceActionValidationFailure()
    {
        Serializable params = null;

        final ServiceActionContext serviceActionContext = new ServiceActionContext(params, principalMock);
        transDef.setReadOnly(true);

        expectServiceAction();
        mockery.checking(new Expectations()
        {
View Full Code Here

    @Test(expected = AuthorizationException.class)
    public void testExecuteWithServiceActionAuthorizationFailure()
    {
        Serializable params = null;

        final ServiceActionContext serviceActionContext = new ServiceActionContext(params, principalMock);
        transDef.setReadOnly(true);

        expectServiceAction();
        mockery.checking(new Expectations()
        {
View Full Code Here

    @Test(expected = ExecutionException.class)
    public void testExecuteWithServiceActionExecutionFailure()
    {
        Serializable params = null;

        final ServiceActionContext serviceActionContext = new ServiceActionContext(params, principalMock);
        transDef.setReadOnly(true);

        expectServiceAction();
        mockery.checking(new Expectations()
        {
View Full Code Here

     *             on error.
     */
    @Test(expected = GeneralException.class)
    public void testExecuteWithQueueServiceActionFailure() throws Exception
    {
        final ServiceActionContext serviceActionContext = mockery.mock(ServiceActionContext.class);
        transDef.setReadOnly(false);

        final List<UserActionRequest> requests = new ArrayList<UserActionRequest>();
        requests.add(userActionRequest);

View Full Code Here

     *             on error.
     */
    @Test(expected = ValidationException.class)
    public void testExecuteWithQueueServiceActionValidationFailure() throws Exception
    {
        final ServiceActionContext serviceActionContext = mockery.mock(ServiceActionContext.class);
        transDef.setReadOnly(false);

        final List<UserActionRequest> requests = new ArrayList<UserActionRequest>();
        requests.add(userActionRequest);

View Full Code Here

     *             on error.
     */
    @Test(expected = AuthorizationException.class)
    public void testExecuteWithQueueServiceActionAuthorizationFailure() throws Exception
    {
        final ServiceActionContext serviceActionContext = mockery.mock(ServiceActionContext.class);
        transDef.setReadOnly(false);

        final List<UserActionRequest> requests = new ArrayList<UserActionRequest>();
        requests.add(userActionRequest);

View Full Code Here

     *             on error.
     */
    @Test(expected = ExecutionException.class)
    public void testExecuteWithQueueServiceActionExecutionFailure() throws Exception
    {
        final ServiceActionContext serviceActionContext = mockery.mock(ServiceActionContext.class);
        transDef.setReadOnly(false);

        final List<UserActionRequest> requests = new ArrayList<UserActionRequest>();
        requests.add(userActionRequest);

View Full Code Here

     *             on error.
     */
    @Test
    public void testExecuteWithQueueServiceAction() throws Exception
    {
        final ServiceActionContext serviceActionContext = mockery.mock(ServiceActionContext.class);
        transDef.setReadOnly(false);

        final List<UserActionRequest> requests = new ArrayList<UserActionRequest>();
        requests.add(userActionRequest);

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.