Package org.zanata.webtrans.shared.model

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


    }

    public static UserWorkspaceContext userWorkspaceContext(
            boolean projectActive, boolean hasWriteAccess, String projectSlug,
            String iterationSlug, ProjectType projectType) {
        ProjectIterationId projectIterationId =
                new ProjectIterationId(projectSlug, iterationSlug, projectType);
        WorkspaceRestrictions workspaceRestrictions =
                new WorkspaceRestrictions(projectActive, hasWriteAccess, true,
                        true, true);
        return new UserWorkspaceContext(new WorkspaceContext(new WorkspaceId(
                projectIterationId, LocaleId.EN_US), "workspaceName",
View Full Code Here


        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

    }

    @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

        // Given: already have submitted request
        GetTranslationMemory submittedRequest =
                mock(GetTranslationMemory.class);
        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",
View Full Code Here

    @Test
    public void canFireSearchEvent() {
        // 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(
View Full Code Here

    @Test
    public void fireSearchEventCallbackOnFailure() {
        // 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",
View Full Code Here

    @Test
    public void fireSearchEventCallbackOnSuccess() {
        // 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",
View Full Code Here

    @Test
    public void fireSearchEventCallbackOnSuccessButResultIsEmpty() {
        // 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",
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

TOP

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

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.