Examples of GetTranslatorListResult


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

                                    person.getEmail()));
            entry.getValue().setPerson(translator);
            translators.put(entry.getKey(), entry.getValue());
        }

        return new GetTranslatorListResult(translators, result.size());
    }
View Full Code Here

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

        when(accountDAO.getByUsername(person.getId().toString())).thenReturn(
                createHAccount("admin@redhat.com", "pahuang"));
        when(gravatarServiceImpl.getUserImageUrl(16, "admin@redhat.com"))
                .thenReturn("gravatarUrl");

        GetTranslatorListResult result = handler.execute(action, null);

        verify(identity).checkLoggedIn();
        assertThat(result.getSize(), Matchers.equalTo(1));
        Map<EditorClientId, PersonSessionDetails> translatorList =
                result.getTranslatorList();
        assertThat(translatorList, Matchers.hasKey(editorClientId));
        assertThat(translatorList.get(editorClientId).getPerson()
                .getAvatarUrl(), Matchers.equalTo("gravatarUrl"));
        assertThat(translatorList.get(editorClientId).getPerson().getName(),
                Matchers.equalTo("pahuang"));
View Full Code Here

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

                                new Person(
                                        new PersonId("personID"),
                                        "Some Person with an Incredibly Long Name",
                                        "http://www.gravatar.com/avatar/longname@zanata.org?d=mm&s=16"),
                                null));
        callback.onSuccess(new GetTranslatorListResult(translator, translator
                .size()));
        Log.info("EXIT DummyGetTranslatorListCommand.execute()");
    }
View Full Code Here

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

    @Test
    @SuppressWarnings("unchecked")
    public void onBindWillLoadTranslatorList() {
        ArgumentCaptor<AsyncCallback> callbackCaptor =
                ArgumentCaptor.forClass(AsyncCallback.class);
        GetTranslatorListResult result = mock(GetTranslatorListResult.class);

        presenter.onBind();

        // on calling get translator list callback success
        verify(dispatcher).execute(Mockito.eq(GetTranslatorList.ACTION),
                callbackCaptor.capture());
        AsyncCallback callback = callbackCaptor.getValue();
        callback.onSuccess(result);
        verify(result).getTranslatorList();
        verify(sessionService).initUserList(result.getTranslatorList());
    }
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.