Package com.google.enterprise.connector.notes.client.mock

Examples of com.google.enterprise.connector.notes.client.mock.NotesDocumentMock.addItem()


    NotesDatabaseMock configDatabase = factory.getDatabase("testconfig.nsf");
    configDatabase.setViewFields(NCCONST.VIEWTEMPLATES,
        NCCONST.TITM_TEMPLATENAME);
    NotesDocumentMock template1 = new NotesDocumentMock();
    configDatabase.addDocument(template1, NCCONST.VIEWTEMPLATES);
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate1"));
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_METAFIELDS,
            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock template2 = new NotesDocumentMock();
    configDatabase.addDocument(template2, NCCONST.VIEWTEMPLATES);
View Full Code Here


        NCCONST.TITM_TEMPLATENAME);
    NotesDocumentMock template1 = new NotesDocumentMock();
    configDatabase.addDocument(template1, NCCONST.VIEWTEMPLATES);
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate1"));
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_METAFIELDS,
            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock template2 = new NotesDocumentMock();
    configDatabase.addDocument(template2, NCCONST.VIEWTEMPLATES);
    template2.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate2"));
View Full Code Here

            "type", NotesItem.TEXT, "values", "testtemplate1"));
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_METAFIELDS,
            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock template2 = new NotesDocumentMock();
    configDatabase.addDocument(template2, NCCONST.VIEWTEMPLATES);
    template2.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate2"));
    template2.addItem(new NotesItemMock("name", NCCONST.TITM_METAFIELDS,
            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock templateResponse = new NotesDocumentMock();
    template2.addResponse(templateResponse);
View Full Code Here

            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock template2 = new NotesDocumentMock();
    configDatabase.addDocument(template2, NCCONST.VIEWTEMPLATES);
    template2.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate2"));
    template2.addItem(new NotesItemMock("name", NCCONST.TITM_METAFIELDS,
            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock templateResponse = new NotesDocumentMock();
    template2.addResponse(templateResponse);

    NotesConnectorSession connectorSession =
View Full Code Here

    NotesDatabaseMock configDatabase = factory.getDatabase("testconfig.nsf");
    configDatabase.setViewFields(NCCONST.VIEWTEMPLATES,
        NCCONST.TITM_TEMPLATENAME);
    NotesDocumentMock template1 = new NotesDocumentMock();
    configDatabase.addDocument(template1, NCCONST.VIEWTEMPLATES);
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate1"));
    NotesDocumentMock templateResponse = new NotesDocumentMock();
    templateResponse.addItem(new NotesItemMock("name", NCCONST.FITM_LASTALIAS,
            "type", NotesItem.TEXT, "values", "testtemplate1form"));
    template1.addResponse(templateResponse);
View Full Code Here

    NotesDocumentMock template1 = new NotesDocumentMock();
    configDatabase.addDocument(template1, NCCONST.VIEWTEMPLATES);
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate1"));
    NotesDocumentMock templateResponse = new NotesDocumentMock();
    templateResponse.addItem(new NotesItemMock("name", NCCONST.FITM_LASTALIAS,
            "type", NotesItem.TEXT, "values", "testtemplate1form"));
    template1.addResponse(templateResponse);

    NotesConnectorSession connectorSession =
        (NotesConnectorSession) connector.login();
View Full Code Here

        crawlDoc.getItemValueString(NCCONST.NCITM_DOCAUTHORREADERS));

    NotesItemMock item = new NotesItemMock("name", "readers",
        "type", NotesItem.TEXT, "values", "reader 1");
    item.setReaders(true);
    srcDoc.addItem(item);
    crawlerThread.getDocumentReaderNames(crawlDoc, srcDoc);
    assertEquals("reader 1",
        crawlDoc.getItemValueString(NCCONST.NCITM_DOCAUTHORREADERS));

    item = new NotesItemMock("name", "readers",
View Full Code Here

        crawlDoc.getFirstItem(NCCONST.NCITM_DOCAUTHORREADERS).getText(100));

    item = new NotesItemMock("name", "authors", "type", NotesItem.TEXT,
        "values", "author 1");
    item.setAuthors(true);
    srcDoc.addItem(item);
    crawlerThread.getDocumentReaderNames(crawlDoc, srcDoc);
    Vector values = crawlDoc.getItemValue(NCCONST.NCITM_DOCAUTHORREADERS);
    assertEquals(3, values.size());
    assertTrue(values.contains("reader 1"));
    assertTrue(values.contains("reader 2"));
View Full Code Here

    // Check that the values from two Readers field are found.
    NotesItemMock item = new NotesItemMock("name", "readers",
        "type", NotesItem.TEXT, "values", "reader 1");
    item.setReaders(true);
    srcDoc.addItem(item);
    item = new NotesItemMock("name", "readers2",
        "type", NotesItem.TEXT, "values", "reader 2");
    item.setReaders(true);
    srcDoc.addItem(item);
    crawlerThread.getDocumentReaderNames(crawlDoc, srcDoc);
View Full Code Here

    item.setReaders(true);
    srcDoc.addItem(item);
    item = new NotesItemMock("name", "readers2",
        "type", NotesItem.TEXT, "values", "reader 2");
    item.setReaders(true);
    srcDoc.addItem(item);
    crawlerThread.getDocumentReaderNames(crawlDoc, srcDoc);
    Vector values = crawlDoc.getItemValue(NCCONST.NCITM_DOCAUTHORREADERS);
    assertEquals(2, values.size());
    assertTrue(values.contains("reader 1"));
    assertTrue(values.contains("reader 2"));
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.