Package org.zanata.webtrans.shared.model

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


    }

    @Test
    public void canGetHistoryAndCurrentTranslation() throws ActionException {
        // Given: text flow has 2 history translation
        action.setWorkspaceId(new WorkspaceId(new ProjectIterationId("rhel",
                "7.0", ProjectType.Podir), localeId));
        when(
                localeService.validateLocaleByProjectIteration(localeId,
                        "rhel", "7.0")).thenReturn(hLocale);
        when(hLocale.getId()).thenReturn(2L);
View Full Code Here


    @Test
    public void canGetCurrentTranslationWithoutLastModifiedBy()
            throws ActionException {
        // Given: text flow has no history translation and only current
        // translation which has no last modified by person
        action.setWorkspaceId(new WorkspaceId(new ProjectIterationId("rhel",
                "7.0", ProjectType.Podir), localeId));
        when(
                localeService.validateLocaleByProjectIteration(localeId,
                        "rhel", "7.0")).thenReturn(hLocale);
        when(hLocale.getId()).thenReturn(2L);
View Full Code Here

    @Test
    public void canStripObsoleteTargetContentBasedOnCurrentNPlural()
            throws ActionException {
        // Given: text flow has no history translation
        action.setWorkspaceId(new WorkspaceId(new ProjectIterationId("rhel",
                "7.0", ProjectType.Podir), localeId));
        when(
                localeService.validateLocaleByProjectIteration(localeId,
                        "rhel", "7.0")).thenReturn(hLocale);
        when(hLocale.getId()).thenReturn(2L);
View Full Code Here

                Lists.newArrayList(new TransUnitUpdateInfo(true, true,
                        new DocumentId(new Long(1), ""), TestFixture
                                .makeTransUnit(1), 0, 0, ContentState.Approved));
        RevertTransUnitUpdates action =
                new RevertTransUnitUpdates(updatesToRevert);
        action.setWorkspaceId(new WorkspaceId(new ProjectIterationId("", "",
                ProjectType.File), LocaleId.EN_US));

        TranslationService.TranslationResult translationResult =
                mockTranslationResult(ContentState.NeedReview, 0);
        when(
View Full Code Here

    }

    @Override
    public void execute() {
        Log.info("ENTER DummyGetDocsListCommand.execute()");
        ProjectIterationId projectIterationId =
                action.getWorkspaceId().getProjectIterationId();
        GetDocumentListResult result =
                new GetDocumentListResult(projectIterationId,
                        generateTransUnitSampleData());
        callback.onSuccess(result);
View Full Code Here

        when(userOptionsService.getConfigHolder()).thenReturn(configHolder);

        presenter = new ChangeReferenceLangPresenter(display, eventBus,
                dispatcher, userOptionsService);

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

        verify(display).setListener(presenter);
    }
View Full Code Here

        // Mock certain objects
        TranslationWorkspace transWorkspace = mock(TranslationWorkspace.class);

        WorkspaceId workspaceId =
                new WorkspaceId(new ProjectIterationId(projectSlug,
                        iterationSlug, ProjectType.Podir), localeId);

        // Set mock expectations
        when(
                transWorspaceManager
View Full Code Here

    private TransMemoryMerge prepareAction(int threshold,
            List<TransUnitUpdateRequest> requests, MergeOptions opts) {
        TransMemoryMerge action =
                new TransMemoryMerge(threshold, requests, opts);
        action.setWorkspaceId(new WorkspaceId(new ProjectIterationId(
                projectSlug, versionSlug, ProjectType.File), targetLocale
                .getLocaleId()));
        return action;
    }
View Full Code Here

        MockitoAnnotations.initMocks(this);
        configHolder = new UserConfigHolder();
        when(mockUserOptionsService.getConfigHolder()).thenReturn(configHolder);

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

        when(mockUserWorkspaceContext.getWorkspaceContext()).thenReturn(
                mockWorkspaceContext);
        when(mockWorkspaceContext.getWorkspaceId()).thenReturn(workspaceId);
View Full Code Here

                        userWorkspaceContext, validationDetailsPresenter,
                        changeReferenceLangPresenter,
                        dispatcher, userOptionsService);

        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.