Package org.zanata.webtrans.shared.model

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


                equalTo(ContentState.NeedReview));
    }

    @Test
    public void differentResIdAndOptionIsIgnore() {
        TransMemoryDetails tmDetail =
                tmDetail(projectName, docId, "different res id", msgContext);

        action = mergeTMActionWhenResIdIsDifferent(MergeRule.IGNORE_CHECK);
        assertThat(resolver.decideStatus(action, textFlow, tmDetail,
                tmResultWithSimilarity(100), null),
View Full Code Here


                equalTo(ContentState.Translated));
    }

    @Test
    public void differentMsgContextAndOptionIsIgnore() {
        TransMemoryDetails tmDetail =
                tmDetail(projectName, docId, resId, "different msg context");

        action = mergeTMActionWhenResIdIsDifferent(MergeRule.IGNORE_CHECK);
        assertThat(resolver.decideStatus(action, textFlow, tmDetail,
                tmResultWithSimilarity(100), null),
View Full Code Here

                equalTo(ContentState.Translated));
    }

    @Test
    public void differentDocIdAndOptionIsFuzzy() {
        TransMemoryDetails tmDetail =
                tmDetail(projectName, "different doc id", resId, msgContext);
        action = mergeTMActionWhenDocIdIsDifferent(MergeRule.FUZZY);
        assertThat(resolver.decideStatus(action, textFlow, tmDetail,
                tmResultWithSimilarity(100), null),
                equalTo(ContentState.NeedReview));
View Full Code Here

                equalTo(ContentState.NeedReview));
    }

    @Test
    public void differentDocIdAndOptionIsIgnore() {
        TransMemoryDetails tmDetail =
                tmDetail(projectName, "different doc id", resId, msgContext);
        action = mergeTMActionWhenDocIdIsDifferent(MergeRule.IGNORE_CHECK);
        assertThat(resolver.decideStatus(action, textFlow, tmDetail,
                tmResultWithSimilarity(100), null),
                equalTo(ContentState.Translated));
View Full Code Here

                equalTo(ContentState.Translated));
    }

    @Test
    public void differentProjectNameAndOptionIsFuzzy() {
        TransMemoryDetails tmDetail =
                tmDetail("different project name", docId, resId, msgContext);
        action = mergeTMActionWhenProjectNameIsDifferent(MergeRule.FUZZY);
        assertThat(resolver.decideStatus(action, textFlow, tmDetail,
                tmResultWithSimilarity(100), null),
                equalTo(ContentState.NeedReview));
View Full Code Here

                equalTo(ContentState.NeedReview));
    }

    @Test
    public void differentProjectNameAndOptionIsIgnore() {
        TransMemoryDetails tmDetail =
                tmDetail("different project name", docId, resId, msgContext);
        action =
                mergeTMActionWhenProjectNameIsDifferent(MergeRule.IGNORE_CHECK);
        assertThat(resolver.decideStatus(action, textFlow, tmDetail,
                tmResultWithSimilarity(100), null),
View Full Code Here

    @Test
    public
            void
            willRejectIfThereIsOldTranslationButCanNotFindTranslationToSetAsApproved() {
        TransMemoryDetails tmDetail =
                tmDetail("different project name", docId, resId, msgContext);
        action = mergeTMActionWhenProjectNameIsDifferent(MergeRule.FUZZY);

        HTextFlowTarget oldTarget =
                new HTextFlowTarget(textFlow, new HLocale());
View Full Code Here

                    TransMemoryMergeStatusResolver.newInstance().decideStatus(
                            action, tmResult, oldTarget);
            comment = buildTargetComment(tu);
        } else {
            HTextFlow tmSource = textFlowDAO.findById(tmSourceId, false);
            TransMemoryDetails tmDetail =
                    translationMemoryServiceImpl.getTransMemoryDetail(hLocale,
                            tmSource);
            statusToSet =
                    TransMemoryMergeStatusResolver.newInstance().decideStatus(
                            action, hTextFlowToBeFilled, tmDetail, tmResult,
View Full Code Here

TOP

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

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.