Package org.zanata.webtrans.client.events

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


            factories.put(TransUnitEdit.class,
                    new EventFactory<TransUnitEditEvent>() {
                        @Override
                        public TransUnitEditEvent
                                create(SessionEventData event) {
                            return new TransUnitEditEvent(
                                    (HasTransUnitEditData) event);
                        }
                    });

            factories.put(PublishWorkspaceChat.class,
View Full Code Here


    }

    @Test
    public void onTransUnitEditEvent() {
        selectedTU = currentPageRows.get(0);
        TransUnitEditEvent event = mock(TransUnitEditEvent.class);
        when(event.getSelectedTransUnitId()).thenReturn(selectedTU.getId());
        ArrayList<ToggleEditor> currentEditors = Lists.newArrayList(editor);
        presenter.setStatesForTesting(selectedTU.getId(), 0, display);
        when(display.getEditors()).thenReturn(currentEditors);

        presenter.onTransUnitEdit(event);
View Full Code Here

        when(hasTransUnitData.getEditorClientId()).thenReturn(editorClientId);
        when(hasTransUnitData.getSelectedTransUnitId()).thenReturn(
                transUnit.getId());

        // When:
        service.onTransUnitEdit(new TransUnitEditEvent(hasTransUnitData));

        // Then:
        assertThat(service.getUserSessionMap().get(editorClientId)
                .getSelectedId(), Matchers.sameInstance(transUnit.getId()));
        assertThat(service.getUserSessionMap().get(editorClientId)
View Full Code Here

TOP

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

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.