Package org.zanata.webtrans.shared.rpc

Examples of org.zanata.webtrans.shared.rpc.PublishWorkspaceChatAction


    }

    protected void dispatchChatAction(String person, String msg,
            MESSAGE_TYPE messageType) {
        if (!Strings.isNullOrEmpty(msg)) {
            dispatcher.execute(new PublishWorkspaceChatAction(person, msg,
                    messageType), new NoOpAsyncCallback<NoOpResult>());
            display.setChatInputText("");
        }
    }
View Full Code Here


        // Then:
        ArgumentCaptor<PublishWorkspaceChatAction> actionCaptor =
                ArgumentCaptor.forClass(PublishWorkspaceChatAction.class);
        verify(dispatcher).execute(actionCaptor.capture(),
                isA(NoOpAsyncCallback.class));
        PublishWorkspaceChatAction chatAction = actionCaptor.getValue();
        assertThat(chatAction.getPerson(),
                Matchers.equalTo(person.getId().toString()));
        assertThat(chatAction.getMsg(), Matchers.equalTo("hello"));
        assertThat(chatAction.getMessageType(),
                Matchers.equalTo(HasWorkspaceChatData.MESSAGE_TYPE.USER_MSG));
        verify(display).setChatInputText("");
    }
View Full Code Here

    }

    @Test
    public void testExecute() throws Exception {
        WorkspaceId workspaceId = TestFixture.workspaceId();
        PublishWorkspaceChatAction action =
                new PublishWorkspaceChatAction("admin", "hi",
                        HasWorkspaceChatData.MESSAGE_TYPE.USER_MSG);
        action.setWorkspaceId(workspaceId);
        when(translationWorkspaceManager.getOrRegisterWorkspace(workspaceId))
                .thenReturn(translationWorkspace);

        handler.execute(action, null);
View Full Code Here

TOP

Related Classes of org.zanata.webtrans.shared.rpc.PublishWorkspaceChatAction

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.