Package org.zanata.webtrans.shared.model

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


        verify(display).stopProcessing(false);
    }

    @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


    @Test
    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

                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

                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

                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

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

        verify(identity).checkLoggedIn();
        assertThat(result.getDocuments(), Matchers.hasSize(1));
        DocumentInfo documentInfo = result.getDocuments().get(0);
        assertThat(documentInfo.getId(),
                Matchers.equalTo(new DocumentId(new Long(1), "")));
        assertThat(documentInfo.getPath(), Matchers.equalTo("/dot/"));
        assertThat(documentInfo.getName(), Matchers.equalTo("a.po"));
    }
View Full Code Here

TOP

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

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.