Package org.zanata.webtrans.client.events

Examples of org.zanata.webtrans.client.events.PublishWorkspaceChatEvent


            factories.put(PublishWorkspaceChat.class,
                    new EventFactory<PublishWorkspaceChatEvent>() {
                        @Override
                        public PublishWorkspaceChatEvent create(
                                SessionEventData event) {
                            return new PublishWorkspaceChatEvent(
                                    (HasWorkspaceChatData) event);
                        }
                    });
            factories.put(AddReviewComment.class, new EventFactory<CommentChangedEvent>() {
                @Override
View Full Code Here


                ShortcutContext.Navigation, true);
    }

    @Test
    public void onPublishWorkspaceChat() {
        PublishWorkspaceChatEvent event =
                Mockito.mock(PublishWorkspaceChatEvent.class);
        when(event.getPersonId()).thenReturn("admin");
        when(event.getMsg()).thenReturn("bye");
        when(event.getMessageType()).thenReturn(
                HasWorkspaceChatData.MESSAGE_TYPE.USER_MSG);
        when(event.getTimestamp()).thenReturn("a minute ago");

        presenter.onPublishWorkspaceChat(event);

        verify(display).appendChat(event.getPersonId(), event.getTimestamp(),
                event.getMsg(), event.getMessageType());
    }
View Full Code Here

TOP

Related Classes of org.zanata.webtrans.client.events.PublishWorkspaceChatEvent

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.