Package org.zanata.webtrans.shared.rpc

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


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


                TestFixture.makeTransUnit(1, ContentState.NeedReview, "target");
        PreviewReplaceText action =
                new PreviewReplaceText(new ReplaceText(transUnit, "target",
                        "replace", true));

        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.rpc.PreviewReplaceTextResult

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.