Package org.zanata.webtrans.shared.rpc

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


                            selectedDetailEntry.getSrcLocale(),
                            selectedDetailEntry.getTargetLocale(),
                            targetTerm.getVersionNum(),
                            targetTerm.getLastChanged());

            return new UpdateGlossaryTermResult(details);
        }
    }
View Full Code Here


        hGlossaryEntry.getGlossaryTerms().put(srcLocale,
                new HGlossaryTerm("source")); // source term
        when(glossaryDAO.makePersistent(hGlossaryEntry)).thenReturn(
                hGlossaryEntry);

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

        verify(identity).checkLoggedIn();
        assertThat(targetTerm.getComments(), Matchers.hasSize(1));
        assertThat(targetTerm.getComments().get(0).getComment(),
                Matchers.equalTo("new comment"));
        assertThat(targetTerm.getContent(), Matchers.equalTo("new target"));
        verify(glossaryDAO).makePersistent(hGlossaryEntry);
        verify(glossaryDAO).flush();
        assertThat(result.getDetail().getTarget(),
                Matchers.equalTo("new target"));

    }
View Full Code Here

                updateGlossarycallbackCaptor.capture());
        AsyncCallback<UpdateGlossaryTermResult> callback =
                updateGlossarycallbackCaptor.getValue();
        GlossaryDetails newDetails = mock(GlossaryDetails.class);
        when(display.getSrcRef()).thenReturn(srcRef);
        callback.onSuccess(new UpdateGlossaryTermResult(newDetails));

        verify(glossaryListener).fireSearchEvent();
        verify(srcRef).setText(newDetails.getSourceRef());
        verify(display).setSourceComment(newDetails.getSourceComment());
        verify(display).setTargetComment(newDetails.getTargetComment());
View Full Code Here

TOP

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

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.