Package org.eurekastreams.commons.server

Examples of org.eurekastreams.commons.server.UserActionRequest


        Serializable results = sut.execute(actionContext);

        context.assertIsSatisfied();
        assertSame(result, results);
        assertEquals(1, actionContext.getUserActionRequests().size());
        UserActionRequest request = actionContext.getUserActionRequests().get(0);
        assertEquals("deleteCacheKeysAction", request.getActionKey());
        assertEquals(1, ((Set<String>) request.getParams()).size());
        assertTrue(((Set<String>) request.getParams()).contains(cacheKey));
    }
View Full Code Here


        sut.execute(wrapperContext);

        context.assertIsSatisfied();
        assertEquals(1, wrapperContext.getUserActionRequests().size());
        UserActionRequest asyncRqst = wrapperContext.getUserActionRequests().get(0);
        assertEquals(9L, asyncRqst.getParams());
        assertEquals(ACTION, asyncRqst.getActionKey());
    }
View Full Code Here

        final List<UserActionRequest> getUpdateCacheRequests = new ArrayList<UserActionRequest>();
        final Principal userPrinicpal = context.mock(Principal.class);

        final List<UserActionRequest> taskActionRequests = new ArrayList<UserActionRequest>();
        final UserActionRequest cacheUpdatingActionRequest = new UserActionRequest("foo", null, null);
        taskActionRequests.add(cacheUpdatingActionRequest);

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

                .createTaskHandlerAsyncContext(9L);
        sut.execute(wrapperContext);

        context.assertIsSatisfied();
        assertEquals(2, wrapperContext.getUserActionRequests().size());
        UserActionRequest asyncRqst = wrapperContext.getUserActionRequests().get(0);
        assertEquals(ACTION, asyncRqst.getActionKey());
        assertTrue(IsEqualInternally.areEqualInternally(rqst1, asyncRqst.getParams()));

        asyncRqst = wrapperContext.getUserActionRequests().get(1);
        assertEquals(ACTION, asyncRqst.getActionKey());
        assertTrue(IsEqualInternally.areEqualInternally(rqst2, asyncRqst.getParams()));
    }
View Full Code Here

     * Test.
     */
    @Test
    public void testExecuteActionSuccessBasic()
    {
        final UserActionRequest sel = new UserActionRequest(ACTION_NAME, null, "");
        mockery.checking(new Expectations()
        {
            {
                allowing(beanFactory).getBean(ACTION_NAME);
                will(returnValue(serviceAction));
View Full Code Here

     * Test.
     */
    @Test(expected = ExecutionException.class)
    public void testExecuteActionErrorBasic()
    {
        final UserActionRequest sel = new UserActionRequest(ACTION_NAME, null, "");
        final ExecutionException exception = new ExecutionException();
        mockery.checking(new Expectations()
        {
            {
                allowing(beanFactory).getBean(ACTION_NAME);
View Full Code Here

     * Test.
     */
    @Test
    public void testExecuteActionSuccessTaskHandler()
    {
        final UserActionRequest sel = new UserActionRequest(ACTION_NAME, null, "");
        mockery.checking(new Expectations()
        {
            {
                allowing(beanFactory).getBean(ACTION_NAME);
                will(returnValue(taskHandlerServiceAction));
View Full Code Here

     * Test.
     */
    @Test(expected = ExecutionException.class)
    public void testExecuteActionErrorTaskHandler()
    {
        final UserActionRequest sel = new UserActionRequest(ACTION_NAME, null, "");
        final ExecutionException exception = new ExecutionException();
        mockery.checking(new Expectations()
        {
            {
                allowing(beanFactory).getBean(ACTION_NAME);
View Full Code Here

     * Test.
     */
    @Test(expected = ExecutionException.class)
    public void testExecuteActionBadBean()
    {
        final UserActionRequest sel = new UserActionRequest(ACTION_NAME, null, "");
        mockery.checking(new Expectations()
        {
            {
                allowing(beanFactory).getBean(ACTION_NAME);
                will(returnValue(""));
View Full Code Here

        final Map data = mockery.mock(Map.class);
        final TransactionStatus transaction = mockery.mock(TransactionStatus.class);
        final States state = mockery.states("trans").startsAs("none");
        final String content = "This is the content";
        final Serializable params = mockery.mock(Serializable.class, "params");
        final UserActionRequest selection = new UserActionRequest(ACTION_NAME, null, params);

        mockery.checking(new Expectations()
        {
            {
                allowing(message).getFrom();
View Full Code Here

TOP

Related Classes of org.eurekastreams.commons.server.UserActionRequest

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.