Package org.zanata.webtrans.shared.model

Examples of org.zanata.webtrans.shared.model.TransUnitUpdatePreview


                .getAction());
        List<TransUnitUpdatePreview> previews =
                new ArrayList<TransUnitUpdatePreview>();
        for (TransUnitUpdateRequest request : previewAction.getAction()
                .getUpdateRequests()) {
            previews.add(new TransUnitUpdatePreview(request.getTransUnitId(),
                    request.getNewContents(), request.getNewContentState()));
        }
        return new PreviewReplaceTextResult(previews);
    }
View Full Code Here


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

        verify(identity).checkLoggedIn();
        assertThat(result.getPreviews(), Matchers.hasSize(1));
        TransUnitUpdatePreview preview = result.getPreviews().get(0);
        assertThat(preview.getId(), Matchers.equalTo(transUnit.getId()));
        assertThat(preview.getState(),
                Matchers.equalTo(ContentState.NeedReview));
        assertThat(preview.getContents(), Matchers.contains("replace"));
    }
View Full Code Here

TOP

Related Classes of org.zanata.webtrans.shared.model.TransUnitUpdatePreview

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.