Examples of AuditInfo


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

        DocumentId doc1 = new DocumentId(1111L, "no/filter/matches");
        DocumentInfo docInfo = documentListPresenter.getDocumentInfo(doc1);

        assertThat(docInfo, is(equalTo(new DocumentInfo(doc1, "doc111",
                "first/path/", LocaleId.EN_US,
                new ContainerTranslationStatistics(), new AuditInfo(new Date(),
                        "Translator"), new HashMap<String, String>(),
                new AuditInfo(new Date(), "last translator")))));

        DocumentId doc2 = new DocumentId(3333L, "does/not/match/exact/filter");
        docInfo = documentListPresenter.getDocumentInfo(doc2);
        assertThat(docInfo, is(equalTo(new DocumentInfo(doc2, "doc123",
                "third/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

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

                .toString()));

        DocumentInfo docInfo =
                new DocumentInfo(new DocumentId(1111L, "no/filter/matches"),
                        "matches", "no/filter", LocaleId.EN_US, stats,
                        new AuditInfo(new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
        docList.add(docInfo);

        docInfo =
                new DocumentInfo(new DocumentId(2222L, "match/exact/filter"),
                        "filter", "match/exact/", LocaleId.EN_US, stats,
                        new AuditInfo(new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
        docList.add(docInfo);

        docInfo =
                new DocumentInfo(new DocumentId(3333L,
                        "does/not/match/exact/filter"), "filter",
                        "does/not/match/exact/", LocaleId.EN_US, stats,
                        new AuditInfo(new Date(), "Translator"),
                        new HashMap<String, String>(), new AuditInfo(
                                new Date(), "last translator"));
        docList.add(docInfo);

        return docList;
    }
View Full Code Here

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

        return documentInfo(id, "", docId);
    }

    public static DocumentInfo documentInfo(long id, String path, String name) {
        return new DocumentInfo(new DocumentId(id, path + name), name, path,
                LocaleId.EN_US, null, new AuditInfo(new Date(), "Translator"),
                null, new AuditInfo(new Date(), "last translator"));
    }
View Full Code Here

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

    }

    private static DocumentInfo docInfo(String name, String path) {
        return new DocumentInfo(new DocumentId(1L, ""), name, 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

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

    @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"));
        userWorkspaceContext.setSelectedDoc(docInfo);

        when(messages.searchGlossary()).thenReturn("Search glossary");
        when(display.getGlossaryTextBox()).thenReturn(mockGlossaryTextBox);
View Full Code Here

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

            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"));
        userWorkspaceContext.setSelectedDoc(docInfo);
        when(messages.searchGlossary()).thenReturn("Search glossary");
        when(display.getGlossaryTextBox()).thenReturn(mockGlossaryTextBox);
        when(mockGlossaryTextBox.getText()).thenReturn("query1", "query2");
View Full Code Here

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

    @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"));
        userWorkspaceContext.setSelectedDoc(docInfo);

        when(messages.searchGlossary()).thenReturn("Search glossary");
        when(display.getGlossaryTextBox()).thenReturn(mockGlossaryTextBox);
View Full Code Here

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

    @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"));
        userWorkspaceContext.setSelectedDoc(docInfo);

        when(messages.searchGlossary()).thenReturn("Search glossary");
        when(display.getGlossaryTextBox()).thenReturn(mockGlossaryTextBox);
View Full Code Here

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

    @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"));
        userWorkspaceContext.setSelectedDoc(docInfo);

        when(messages.searchGlossary()).thenReturn("Search glossary");
        when(display.getGlossaryTextBox()).thenReturn(mockGlossaryTextBox);
View Full Code Here

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

    @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"));
        userWorkspaceContext.setSelectedDoc(docInfo);
        when(messages.searchGlossary()).thenReturn("Search glossary");
        when(display.getGlossaryTextBox()).thenReturn(mockGlossaryTextBox);
        when(mockGlossaryTextBox.getText()).thenReturn("query");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.