Package org.zanata.webtrans.shared.model

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


        return workspaceId(localeId, "project", "master", ProjectType.Podir);
    }

    public static WorkspaceId workspaceId(LocaleId localeId,
            String projectSlug, String iterationSlug, ProjectType projectType) {
        return new WorkspaceId(new ProjectIterationId(projectSlug,
                iterationSlug, projectType), localeId);
    }
View Full Code Here


                new DocumentListOptionsPresenter(display, eventBus,
                        userWorkspaceContext, dispatcher, userOptionsService);
        when(userOptionsService.getConfigHolder()).thenReturn(configHolder);

        workspaceId =
                new WorkspaceId(new ProjectIterationId("projectSlug",
                        "iterationSlug", ProjectType.Podir), LocaleId.EN_US);

        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                workspaceContext);
        when(workspaceContext.getWorkspaceId()).thenReturn(workspaceId);
View Full Code Here

        verify(eventBus).fireEvent(eventCaptor.capture());
    }

    @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(
View Full Code Here

        presenter.setStatesForTesting(null, submittedRequest);
        LocaleId localeId = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                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(
View Full Code Here

        // Given:
        LocaleId targetLocale = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                new ProjectIterationId("project", "master", ProjectType.Podir);
        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,
View Full Code Here

        // Given:
        LocaleId localeId = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                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(
View Full Code Here

        // Given:
        LocaleId localeId = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                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(
View Full Code Here

        // Given:
        LocaleId localeId = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                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(
View Full Code Here

                        optionsPresenter, validationOptionsPresenter,
                        workspaceUsersPresenter, notificationPresenter,
                        sessionService, userWorkspaceContext);

        workspaceId =
                new WorkspaceId(new ProjectIterationId("projectSlug",
                        "iterationSlug", ProjectType.Podir), LocaleId.EN_US);

        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                workspaceContext);
        when(workspaceContext.getWorkspaceId()).thenReturn(workspaceId);
View Full Code Here

        return projectIteration;
    }

    @Test(expectedExceptions = NoSuchWorkspaceException.class)
    public void testRegisterInvalidWorkspace() throws Exception {
        WorkspaceId workspaceId = TestFixture.workspaceId();
        when(
                projectIterationDAO.getBySlug(workspaceId
                        .getProjectIterationId().getProjectSlug(), workspaceId
                        .getProjectIterationId().getIterationSlug()))
                .thenReturn(null);

        manager.getOrRegisterWorkspace(workspaceId);
    }
View Full Code Here

TOP

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

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.