Package org.zanata.webtrans.client.events

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


    public void selectByRowIndex(int rowIndexOnPage) {
        if (pageModel.getCurrentRow() != rowIndexOnPage) {
            pageModel.setSelected(rowIndexOnPage);
            contextHolder.changeTargetTransUnitId(pageModel.getSelectedOrNull()
                    .getId());
            eventBus.fireEvent(new TransUnitSelectionEvent(getSelectedOrNull()));
            navigationStateHolder.updateSelected(getSelectedOrNull().getId());
        }
    }
View Full Code Here


        TransUnit transUnit =
                TransUnit.Builder.newTransUnitBuilder().setId(1)
                        .setResId("resId").setVerNum(0).setLocaleId("en")
                        .addSource("source1", "source2").setRowIndex(1).build();

        presenter.onTransUnitSelected(new TransUnitSelectionEvent(transUnit));

        verify(display).startProcessing();
        verify(dispatcher).execute(getGlossaryCaptor.capture(),
                callbackCaptor.capture());
        GetGlossary action = getGlossaryCaptor.getValue();
View Full Code Here

        TransUnit selection = TestFixture.makeTransUnit(1);
        TransMemoryPresenter spyPresenter = spy(presenter);
        doNothing().when(spyPresenter).createTMRequestForTransUnit(selection);

        spyPresenter
                .onTransUnitSelected(new TransUnitSelectionEvent(selection));

        verify(spyPresenter).createTMRequestForTransUnit(selection);
    }
View Full Code Here

    @Test
    public void onTransUnitSelected() {
        // Given:
        TransUnit selection = TestFixture.makeTransUnit(1);
        TransUnitSelectionEvent transUnitSelectionEvent =
                new TransUnitSelectionEvent(selection);

        // When:
        presenter.onTransUnitSelected(transUnitSelectionEvent);

        // Then:
View Full Code Here

TOP

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

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.