Package org.zanata.webtrans.shared.rpc

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


        this.dispatcher = dispatcher;
    }

    public void transUnitSelected(TransUnit selectedTransUnit) {
        dispatcher
                .execute(new TransUnitEditAction(identity.getPerson(),
                        selectedTransUnit.getId()),
                        new NoOpAsyncCallback<NoOpResult>());
    }
View Full Code Here


        return identity.getEditorClientId();
    }

    public void personExit(Person person, TransUnitId selectedTransUnitId) {
        if (selectedTransUnitId != null) {
            dispatcher.execute(new TransUnitEditAction(person,
                    selectedTransUnitId), new NoOpAsyncCallback<NoOpResult>());
        }
    }
View Full Code Here

        TransUnit selectedTransUnit = TestFixture.makeTransUnit(1);
        service.transUnitSelected(selectedTransUnit);

        verify(dispatcher).execute(actionCaptor.capture(),
                Mockito.isA(NoOpAsyncCallback.class));
        TransUnitEditAction action = actionCaptor.getValue();
        assertThat(action.getPerson(),
                Matchers.sameInstance(identity.getPerson()));
        assertThat(action.getSelectedTransUnitId(),
                Matchers.sameInstance(selectedTransUnit.getId()));
    }
View Full Code Here

        service.personExit(person, selectedTransUnit.getId());

        verify(dispatcher).execute(actionCaptor.capture(),
                Mockito.isA(NoOpAsyncCallback.class));
        TransUnitEditAction action = actionCaptor.getValue();
        assertThat(action.getPerson(), Matchers.sameInstance(person));
        assertThat(action.getSelectedTransUnitId(),
                Matchers.sameInstance(selectedTransUnit.getId()));
    }
View Full Code Here

    public void testExecute() throws Exception {
        Person person = TestFixture.person();
        TransUnit selectedTransUnit = TestFixture.makeTransUnit(1);
        WorkspaceId workspaceId = TestFixture.workspaceId();
        EditorClientId editorClientId = new EditorClientId("sessionId", 1);
        TransUnitEditAction action =
                new TransUnitEditAction(person, selectedTransUnit.getId());
        action.setWorkspaceId(workspaceId);
        action.setEditorClientId(editorClientId);
        when(translationWorkspaceManager.getOrRegisterWorkspace(workspaceId))
                .thenReturn(translationWorkspace);

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

TOP

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

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.