Package org.zanata.webtrans.shared.model

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


    }

    @Test
    public void fireSearchEvent() {
        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(new Long(1), ""), "test",
                        "test/path", LocaleId.EN_US,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
View Full Code Here


    @Test
    public void
            fireSearchEventInSequentialWillBlockSecondRequestUntilFirstReturn() {
        // Given:
        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(new Long(1), ""), "test",
                        "test/path", LocaleId.EN_US,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
View Full Code Here

    }

    @Test
    public void fireSearchEventOnSuccessCallbackWithGlossaryResults() {
        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(new Long(1), ""), "test",
                        "test/path", LocaleId.EN_US,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
View Full Code Here

    }

    @Test
    public void fireSearchEventOnSuccessCallbackButNoGlossaryFound() {
        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(new Long(1), ""), "test",
                        "test/path", LocaleId.EN_US,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
View Full Code Here

    }

    @Test
    public void fireSearchEventOnFailureCallback() {
        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(new Long(1), ""), "test",
                        "test/path", LocaleId.EN_US,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
View Full Code Here

    }

    @Test
    public void createGlossaryRequestForTransUnit() {
        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(new Long(1), ""), "test",
                        "test/path", LocaleId.EN_US,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
View Full Code Here

                        makeTransUnit(2, ContentState.NeedReview),
                        makeTransUnit(3, ContentState.New),
                        makeTransUnit(4, ContentState.NeedReview));
        mockCurrentPageToReturn(currentPageRows);
        UndoLink undoLink = mock(UndoLink.class);
        DocumentId documentId = new DocumentId(new Long(0), "");
        when(undoLinkProvider.get()).thenReturn(undoLink);

        // When:
        MergeOptions opts = MergeOptions.allFuzzy();
        opts.setDifferentProject(MergeRule.REJECT);
View Full Code Here

    public void createTMRequestForTransUnit() {
        WorkspaceId workspaceId =
                new WorkspaceId(new ProjectIterationId("projectSlug",
                        "iterationSlug", ProjectType.Podir), LocaleId.EN_US);
        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(new Long(1), ""), "test",
                        "test/path", LocaleId.EN_US,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
View Full Code Here

                new ProjectIterationId("project", "master", ProjectType.Podir);
        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                new WorkspaceContext(new WorkspaceId(projectIterationId,
                        localeId), "workspaceName", localeId.getId()));
        when(userWorkspaceContext.getSelectedDoc()).thenReturn(
                new DocumentInfo(new DocumentId(new Long(1), ""), "doc.txt",
                        "/pot", new LocaleId("en-US"),
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator")));
View Full Code Here

        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                new WorkspaceContext(new WorkspaceId(projectIterationId,
                        targetLocale), "workspaceName", targetLocale.getId()));
        LocaleId sourceLocale = new LocaleId("en-US");
        when(userWorkspaceContext.getSelectedDoc()).thenReturn(
                new DocumentInfo(new DocumentId(new Long(1), ""), "doc.txt",
                        "/pot", sourceLocale,
                        new ContainerTranslationStatistics(), new AuditInfo(
                                new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator")));
View Full Code Here

TOP

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

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.