Examples of PublishWorkspaceChatAction


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

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

        // 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

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

    }

    @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
Copyright © 2018 www.massapi.com. 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.